Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipwireless: Constify buffer variables

ipwireless: Constify buffer variables

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Sterba and committed by
Linus Torvalds
ff3e990e 93110f69

+16 -14
+14 -12
drivers/char/pcmcia/ipwireless/hardware.c
··· 30 30 static void ipw_send_setup_packet(struct ipw_hardware *hw); 31 31 static void handle_received_SETUP_packet(struct ipw_hardware *ipw, 32 32 unsigned int address, 33 - unsigned char *data, int len, 33 + const unsigned char *data, int len, 34 34 int is_last); 35 35 static void ipwireless_setup_timer(unsigned long data); 36 36 static void handle_received_CTRL_packet(struct ipw_hardware *hw, 37 - unsigned int channel_idx, unsigned char *data, int len); 37 + unsigned int channel_idx, const unsigned char *data, int len); 38 38 39 39 /*#define TIMING_DIAGNOSTICS*/ 40 40 ··· 615 615 } 616 616 617 617 static void queue_received_packet(struct ipw_hardware *hw, 618 - unsigned int protocol, unsigned int address, 619 - unsigned char *data, int length, int is_last) 618 + unsigned int protocol, 619 + unsigned int address, 620 + const unsigned char *data, int length, 621 + int is_last) 620 622 { 621 623 unsigned int channel_idx = address - 1; 622 624 struct ipw_rx_packet *packet = NULL; ··· 762 760 763 761 static void handle_received_CTRL_packet(struct ipw_hardware *hw, 764 762 unsigned int channel_idx, 765 - unsigned char *data, int len) 763 + const unsigned char *data, int len) 766 764 { 767 - struct ipw_control_packet_body *body = 768 - (struct ipw_control_packet_body *) data; 765 + const struct ipw_control_packet_body *body = 766 + (const struct ipw_control_packet_body *) data; 769 767 unsigned int changed_mask; 770 768 771 769 if (len != sizeof(struct ipw_control_packet_body)) { ··· 807 805 } 808 806 809 807 static void handle_received_packet(struct ipw_hardware *hw, 810 - union nl_packet *packet, 808 + const union nl_packet *packet, 811 809 unsigned short len) 812 810 { 813 811 unsigned int protocol = packet->hdr.protocol; 814 812 unsigned int address = packet->hdr.address; 815 813 unsigned int header_length; 816 - unsigned char *data; 814 + const unsigned char *data; 817 815 unsigned int data_len; 818 816 int is_last = packet->hdr.packet_rank & NL_LAST_PACKET; 819 817 ··· 1290 1288 } 1291 1289 1292 1290 int ipwireless_send_packet(struct ipw_hardware *hw, unsigned int channel_idx, 1293 - unsigned char *data, unsigned int length, 1291 + const unsigned char *data, unsigned int length, 1294 1292 void (*callback) (void *cb, unsigned int length), 1295 1293 void *callback_data) 1296 1294 { ··· 1524 1522 1525 1523 static void handle_received_SETUP_packet(struct ipw_hardware *hw, 1526 1524 unsigned int address, 1527 - unsigned char *data, int len, 1525 + const unsigned char *data, int len, 1528 1526 int is_last) 1529 1527 { 1530 - union ipw_setup_rx_msg *rx_msg = (union ipw_setup_rx_msg *) data; 1528 + const union ipw_setup_rx_msg *rx_msg = (const union ipw_setup_rx_msg *) data; 1531 1529 1532 1530 if (address != ADDR_SETUP_PROT) { 1533 1531 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
+1 -1
drivers/char/pcmcia/ipwireless/hardware.h
··· 41 41 int state); 42 42 int ipwireless_send_packet(struct ipw_hardware *hw, 43 43 unsigned int channel_idx, 44 - unsigned char *data, 44 + const unsigned char *data, 45 45 unsigned int length, 46 46 void (*packet_sent_callback) (void *cb, 47 47 unsigned int length),
+1 -1
drivers/char/pcmcia/ipwireless/tty.c
··· 259 259 } 260 260 261 261 ret = ipwireless_send_packet(tty->hardware, IPW_CHANNEL_RAS, 262 - (unsigned char *) buf, count, 262 + buf, count, 263 263 ipw_write_packet_sent_callback, tty); 264 264 if (ret == -1) { 265 265 mutex_unlock(&tty->ipw_tty_mutex);