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

staging: ft1000: status variables changed to int in ft1000_download.c

Linux uses a return type of int for status codes. The file
ft1000_download.c uses a mixture of u16 and u32. This patch changes all
variables called status or Status to ints, whether they are returned
from the function or not. It also changes the return type of all
functions returning one of the variables to correspond. Also, the
declaration of scram_dnldr has been changed in ft1000_usb.h.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kelley Nielsen and committed by
Greg Kroah-Hartman
8cf9ff57 74827f8d

+16 -16
+15 -15
drivers/staging/ft1000/ft1000-usb/ft1000_download.c
··· 108 108 109 109 110 110 /* checks if the doorbell register is cleared */ 111 - static u32 check_usb_db(struct ft1000_usb *ft1000dev) 111 + static int check_usb_db(struct ft1000_usb *ft1000dev) 112 112 { 113 113 int loopcnt; 114 114 u16 temp; 115 - u32 status; 115 + int status; 116 116 117 117 loopcnt = 0; 118 118 ··· 159 159 { 160 160 u16 handshake; 161 161 int loopcnt; 162 - u32 status = 0; 162 + int status = 0; 163 163 164 164 loopcnt = 0; 165 165 ··· 206 206 { 207 207 u32 tempx; 208 208 u16 tempword; 209 - u32 status; 209 + int status; 210 210 211 211 tempx = (u32)handshake_value; 212 212 tempx = ntohl(tempx); ··· 226 226 u16 handshake; 227 227 int loopcnt; 228 228 u16 temp; 229 - u32 status = 0; 229 + int status = 0; 230 230 231 231 loopcnt = 0; 232 232 handshake = 0; ··· 278 278 static u16 get_request_type(struct ft1000_usb *ft1000dev) 279 279 { 280 280 u16 request_type; 281 - u32 status; 281 + int status; 282 282 u16 tempword; 283 283 u32 tempx; 284 284 ··· 301 301 static u16 get_request_type_usb(struct ft1000_usb *ft1000dev) 302 302 { 303 303 u16 request_type; 304 - u32 status; 304 + int status; 305 305 u16 tempword; 306 306 u32 tempx; 307 307 ··· 331 331 { 332 332 u32 value; 333 333 u16 tempword; 334 - u32 status; 334 + int status; 335 335 336 336 if (ft1000dev->bootmode == 1) { 337 337 status = fix_ft1000_read_dpram32(ft1000dev, ··· 355 355 static void put_request_value(struct ft1000_usb *ft1000dev, long lvalue) 356 356 { 357 357 u32 tempx; 358 - u32 status; 358 + int status; 359 359 360 360 tempx = ntohl(lvalue); 361 361 status = fix_ft1000_write_dpram32(ft1000dev, DWNLD_MAG1_SIZE_LOC, ··· 523 523 * u8 **pUcFile - DSP image file pointer in u8 524 524 * long word_length - length of the buffer to be written to DPRAM 525 525 */ 526 - static u32 write_blk_fifo(struct ft1000_usb *ft1000dev, u16 **pUsFile, 526 + static int write_blk_fifo(struct ft1000_usb *ft1000dev, u16 **pUsFile, 527 527 u8 **pUcFile, long word_length) 528 528 { 529 - u32 Status = STATUS_SUCCESS; 529 + int Status = STATUS_SUCCESS; 530 530 int byte_length; 531 531 532 532 byte_length = word_length * 4; ··· 575 575 return status; 576 576 } 577 577 578 - static u16 request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file, 578 + static int request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file, 579 579 u8 **c_file, const u8 *endpoint, bool boot_case) 580 580 { 581 581 long word_length; 582 - u16 status; 582 + int status; 583 583 584 584 /*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/ 585 585 word_length = get_request_value(ft1000dev); ··· 613 613 } 614 614 615 615 /* Scramble downloader for Harley based ASIC via USB interface */ 616 - u16 scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, 616 + int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, 617 617 u32 FileLength) 618 618 { 619 - u16 status = STATUS_SUCCESS; 619 + int status = STATUS_SUCCESS; 620 620 u32 state; 621 621 u16 handshake; 622 622 struct pseudo_hdr *pseudo_header;
+1 -1
drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
··· 125 125 extern int numofmsgbuf; 126 126 127 127 int ft1000_close(struct net_device *dev); 128 - u16 scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, 128 + int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, 129 129 u32 FileLength); 130 130 131 131 extern struct list_head freercvpool;