Re: [PATCH 5/5] staging: wilc1000: use id value as argument
Hello Julian. On 2015년 08월 10일 15:47, Julian Calaby wrote: Hi Tony and Johnny, On Mon, Aug 10, 2015 at 3:58 PM, Tony Cho wrote: From: Johnny Kim The driver communicates with the chipset via the address of handlers to distinguish async data frame. The SendConfigPkt function gets the pointer address indicating the handlers as the last argument, but this requires redundant typecasting and does not support the 64 bit machine. This patch adds the function which assigns ID values instead of pointer representing the driver handler to the address and then uses the ID instead of pointer as the last argument of SendConfigPkt. The driver also gets the handler's address from the ID in the data frame when it receives them. Excellent work! A couple of minor questions: diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c4e27c7..5a0277f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -616,7 +680,8 @@ static s32 Handle_SetChannel(tstrWILC_WFIDrv *drvHandler, tstrHostIFSetChan *pst PRINT_D(HOSTINF_DBG, "Setting channel\n"); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = (SET_CFG, &strWID, 1, true, +get_id_from_handler(pstrWFIDrv)); Would it make sense to call get_id_from_handler() inside SendConfigPkt() instead? SendConfigPkt function can't be aware of tstrWILC_WFIDrv type because SendConfigPkt is defined before tstrWILC_WFIDrv. if (s32Error) { PRINT_ER("Failed to set channel\n"); WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE); @@ -653,7 +718,8 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true,host_int_set_wfi_drv_handler +pstrHostIfSetDrvHandler->u32Address); Is this correct? pstrHostIfSetDrvHandler->u32Address value which is input as argument isn't pointer address but ID value. The value was filled in host_int_set_wfi_drv_handler function. if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL) @@ -6772,11 +6888,11 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length) { s32 s32Error = WILC_SUCCESS; tstrHostIFmsg strHostIFmsg; - u32 drvHandler; + u32 id; tstrWILC_WFIDrv *pstrWFIDrv = NULL; - drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); - pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler; + id = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24)); Would be32_to_cpu() or something like that be able to help you do this? Thank for your comment. I will fix it on another subject. + pstrWFIDrv = get_handler_from_id(id); Thanks, ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/2] staging: lustre-libcfs: fix sparse warning
Fix sparse warnings of the following type: warning: symbol '' was not declared. Should it be static? Signed-off-by: Patrick Boettcher --- drivers/staging/lustre/include/linux/libcfs/libcfs.h | 13 + drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 2 -- drivers/staging/lustre/lustre/libcfs/module.c | 11 +-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index d585041..01961d9 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -148,4 +148,17 @@ void *libcfs_kvzalloc(size_t size, gfp_t flags); void *libcfs_kvzalloc_cpt(struct cfs_cpt_table *cptab, int cpt, size_t size, gfp_t flags); +extern struct miscdevice libcfs_dev; +/** + * The path of debug log dump upcall script. + */ +extern char lnet_upcall[1024]; +extern char lnet_debug_log_upcall[1024]; + +extern void libcfs_init_nidstrings(void); + +extern struct cfs_psdev_ops libcfs_psdev_ops; + +extern struct cfs_wi_sched *cfs_sched_rehash; + #endif /* _LIBCFS_H */ diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c index 78acff0..64a984b 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c @@ -96,8 +96,6 @@ int libcfs_ioctl_popdata(void *arg, void *data, int size) return 0; } -extern struct cfs_psdev_ops libcfs_psdev_ops; - static int libcfs_psdev_open(struct inode *inode, struct file *file) { diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c index b0330a4..3cce06a 100644 --- a/drivers/staging/lustre/lustre/libcfs/module.c +++ b/drivers/staging/lustre/lustre/libcfs/module.c @@ -66,19 +66,10 @@ MODULE_AUTHOR("Peter J. Braam "); MODULE_DESCRIPTION("Portals v3.1"); MODULE_LICENSE("GPL"); -extern struct miscdevice libcfs_dev; -extern struct cfs_wi_sched *cfs_sched_rehash; -extern void libcfs_init_nidstrings(void); - static void insert_debugfs(void); static void remove_debugfs(void); static struct dentry *lnet_debugfs_root; -extern char lnet_upcall[1024]; -/** - * The path of debug log dump upcall script. - */ -extern char lnet_debug_log_upcall[1024]; static void kportal_memhog_free(struct libcfs_device_userstate *ldu) { @@ -714,7 +705,7 @@ struct lnet_debugfs_symlink_def { char *target; }; -struct lnet_debugfs_symlink_def lnet_debugfs_symlinks[] = { +static struct lnet_debugfs_symlink_def lnet_debugfs_symlinks[] = { { "console_ratelimit", "/sys/module/libcfs/parameters/libcfs_console_ratelimit"}, { "debug_path", -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/2] staging: lustre-libcfs: make static-variable constant
This static can be made constant as it is never modified. Found during sparse-cleanup. Signed-off-by: Patrick Boettcher --- drivers/staging/lustre/lustre/libcfs/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c index 3cce06a..f448fe3 100644 --- a/drivers/staging/lustre/lustre/libcfs/module.c +++ b/drivers/staging/lustre/lustre/libcfs/module.c @@ -705,7 +705,7 @@ struct lnet_debugfs_symlink_def { char *target; }; -static struct lnet_debugfs_symlink_def lnet_debugfs_symlinks[] = { +static const struct lnet_debugfs_symlink_def lnet_debugfs_symlinks[] = { { "console_ratelimit", "/sys/module/libcfs/parameters/libcfs_console_ratelimit"}, { "debug_path", @@ -760,7 +760,7 @@ static void insert_debugfs(void) { struct ctl_table *table; struct dentry *entry; - struct lnet_debugfs_symlink_def *symlinks; + const struct lnet_debugfs_symlink_def *symlinks; if (lnet_debugfs_root == NULL) lnet_debugfs_root = debugfs_create_dir("lnet", NULL); -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/14] staging: comedi: hwdrv_apci1564: tidy up code
On 07/08/15 19:45, H Hartley Sweeten wrote: The hwdrv_apci1564.c file is included by the addi_apci_1564 driver to provide the support code for the timer and counter subdevices. The code in this file is broken with respect to how comedi works with subdevices. Tidy it up so that it can be fixed. H Hartley Sweeten (14): staging: comedi: addi_tcw.h: prefer using the BIT macro staging: comedi: hwdrv_apci1564: remove unused defines staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_CTRL_REG bits staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_STATUS_REG bits staging: comedi: addi_apci_1564: define the APCI1564_DO_IRQ_REG bits staging: comedi: addi_apci_1564: define the APCI1564_DI_IRQ_REG bits staging: comedi: addi_apci_1564: tidy up APCI1564_EEPROM_REG bit defines staging: comedi: hwdrv_apci1564: use addi_tcw.h defines staging: comedi: hwdrv_apci1564: tidy up apci1564_timer_insn_write() staging: comedi: hwdrv_apci1564: remove magic number in apci1564_timer_insn_read() staging: comedi: hwdrv_apci1564: remove useless code in apci1564_counter_insn_config() staging: comedi: hwdrv_apci1564: fix counter "mode" setting staging: comedi: hwdrv_apci1564: tidy up apci1564_counter_insn_write() staging: comedi: hwdrv_apci1564: remove magic numbers in apci1564_counter_insn_read() .../comedi/drivers/addi-data/hwdrv_apci1564.c | 93 +- drivers/staging/comedi/drivers/addi_apci_1564.c| 35 drivers/staging/comedi/drivers/addi_tcw.h | 63 --- 3 files changed, 93 insertions(+), 98 deletions(-) Looks good. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc100: Remove pointer and integer comparision
On Sun, Aug 09, 2015 at 08:50:02PM +0530, Chandra S Gorentla wrote: > Removed pointer check with integer; this fixes 'sparse' error - > error: incompatible types for operation (>) >left side has type unsigned char [usertype] *[usertype] pu8Tail >right side has type int > > Signed-off-by: Chandra S Gorentla > --- > drivers/staging/wilc1000/host_interface.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/wilc1000/host_interface.c > b/drivers/staging/wilc1000/host_interface.c > index cc549c2..4ba1ad7 100644 > --- a/drivers/staging/wilc1000/host_interface.c > +++ b/drivers/staging/wilc1000/host_interface.c > @@ -3471,7 +3471,7 @@ static void Handle_AddBeacon(void *drvHandler, > tstrHostIFSetBeacon *pstrSetBeaco > *pu8CurrByte++ = ((pstrSetBeaconParam->u32TailLen >> 24) & 0xFF); > > /* Bug 4599 : if tail length = 0 skip copying */ > - if (pstrSetBeaconParam->pu8Tail > 0) > + if (pstrSetBeaconParam->pu8Tail != NULL) > memcpy(pu8CurrByte, pstrSetBeaconParam->pu8Tail, > pstrSetBeaconParam->u32TailLen); > pu8CurrByte += pstrSetBeaconParam->u32TailLen; Warnings are a precious thing, because they show you where people are lost. It's better to take a broader look at the code instead of *just* silencing the warning. For example, the comment is nonsense. memcpy(anything, anything, 0); is a no-op so it already would skip copying in that case. I wonder what bug 4599 actually means... Also the next line is quite suspect. Even though we don't copy then we are still incrementing the pu8CurrByte count? That seems wrong. So now let's consider if the memcpy() is correct. pu8CurrByte is allocated at the start of the function. It should have space for ->u32TailLen bytes, except for they seem to have forgotten about integer overflow. I think ->u32TailLen is not trusted data so this could be a security bug. Maybe you could exploit it by setting ->u32HeadLen to the amount of memory you want to corrupt. Set ->u32TailLen to a high number so it triggers an integer overflow. Set >pu8Tail to NULL so it is doesn't just corrupt everything (DoS attack instead of privilege escalation). I have just looked at the code so I don't know if this is true, but this is how I read that warning. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: dgnc: Fixed line over 80 characters in dgnc_mgmt.c
On Sun, Aug 09, 2015 at 06:15:36PM +0530, Bhaktipriya Shridhar wrote: > Fixed coding style issue "warning line over 80 characters" > detected by checkpatch.pl in dgnc_mgmt.c No signed off by. > --- > drivers/staging/dgnc/dgnc_mgmt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/dgnc/dgnc_mgmt.c > b/drivers/staging/dgnc/dgnc_mgmt.c > index b13318a..e8fd3da 100644 > --- a/drivers/staging/dgnc/dgnc_mgmt.c > +++ b/drivers/staging/dgnc/dgnc_mgmt.c > @@ -148,7 +148,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, > unsigned long arg) > di.info_bdstate = dgnc_Board[brd]->dpastatus; > di.info_ioport = 0; > di.info_physaddr = (ulong) dgnc_Board[brd]->membase; > - di.info_physsize = (ulong) dgnc_Board[brd]->membase - > dgnc_Board[brd]->membase_end; > + di.info_physsize = (ulong) dgnc_Board[brd]->membase - > + dgnc_Board[brd]->membase_end; Better to align it like: di.info_physsize = (ulong)dgnc_Board[brd]->membase - dgnc_Board[brd]->membase_end; But even better would be to rename brd to brd_idx and introduce a new "struct dgnc_board *brd" variable and set: brd = dgnc_Board[brd_idx]; Then replace ever reference to "dgnc_Board[brd]" with just "brd". regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging/lustre: add annotations for user space pointers
On Sat, Aug 08, 2015 at 02:31:40PM -0700, Greg KH wrote: > > int libcfs_register_ioctl(struct libcfs_ioctl_handler *hand); > > int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand); > > -int libcfs_ioctl_getdata(char *buf, char *end, void *arg); > > -int libcfs_ioctl_popdata(void *arg, void *buf, int size); > > +int libcfs_ioctl_getdata(char *buf, char *end, void __user *arg); > > +int libcfs_ioctl_popdata(void __user *arg, void *buf, int size); > > This isn't going to work well at all, please see the mailing list > archives for why. > This one moves the warnings around, yes, but it moves them closer to where the warnings belong. I look at it like an improvement. That said, I think we should just get rid of these functions and call copy_from/to_user() directly. Abstracting it out just makes the code harder to read. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 5/5] staging: wilc1000: use id value as argument
On Mon, Aug 10, 2015 at 02:58:24PM +0900, Tony Cho wrote: > +static u32 add_handler_in_list(tstrWILC_WFIDrv *handler) I am suspicous of code which uses u32 for something where the hardware doesn't specify unsigned 32 bits. Why not just return "int"? > +{ > + u32 id; It looks like we have a case of u32 disease. Prefer int over u32 unless there is a reason for it. > + > + if (!handler) > + return 0; Don't add NULL checks unless it makes sense. How are we supposed to recover from this if handler is NULL? > + > + for (id = 0; id < NUM_CONCURRENT_IFC; id++) { > + if (!wfidrv_list[id]) { > + wfidrv_list[id++] = handler; Ugh... I don't like the ++ here. Just use a zero offset array or we are going to have off by one bugs. > + break; > + } > + } > + > + if (id > NUM_CONCURRENT_IFC) > + return 0; Well, that didn't take long, it's three lines later and we already have hit our first off by one bug. This check can never be true. Of course, no one checks the return value either... > + > + return id; > +} I guess I would be fine with this patch if you changed it to use a zero offset array, ints instead of u32s and added some error handling. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] X86: mshyperv.c: Fix a compilation issue.
KY Srinivasan writes: >> -Original Message- >> From: Greg KH [mailto:gre...@linuxfoundation.org] >> Sent: Thursday, August 6, 2015 2:11 PM >> To: KY Srinivasan >> Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; >> vkuzn...@redhat.com; s...@canb.auug.org.au; t...@linutronix.de; >> mi...@redhat.com; h...@zytor.com; x...@kernel.org; Haiyang Zhang >> >> Subject: Re: [PATCH 1/1] X86: mshyperv.c: Fix a compilation issue. >> >> On Thu, Aug 06, 2015 at 02:41:24PM -0700, K. Y. Srinivasan wrote: >> > Building with a random configuration file, this build failure >> > was reported: >> > >> > arch/x86/built-in.o: In function `hv_machine_crash_shutdown': >> > arch/x86/kernel/cpu/mshyperv.c:112: undefined >> > reference to `native_machine_crash_shutdown' >> > >> > This patch fixes the problem >> > >> > Reported-by: Jim Davis >> > Signed-off-by: K. Y. Srinivasan >> > --- >> > arch/x86/kernel/cpu/mshyperv.c |2 ++ >> > 1 files changed, 2 insertions(+), 0 deletions(-) >> > >> > diff --git a/arch/x86/kernel/cpu/mshyperv.c >> > b/arch/x86/kernel/cpu/mshyperv.c >> > index f794bfa..0faed5e0 100644 >> > --- a/arch/x86/kernel/cpu/mshyperv.c >> > +++ b/arch/x86/kernel/cpu/mshyperv.c >> > @@ -109,7 +109,9 @@ static void hv_machine_crash_shutdown(struct pt_regs >> > *regs) >> > { >> >if (hv_crash_handler) >> >hv_crash_handler(regs); >> > +#ifdef CONFIG_KEXEC_CORE >> >native_machine_crash_shutdown(regs); >> > +#endif >> >> Why is kexec the factor here? And if it really does, can't it just be >> CONFIG_KEXEC, or, can kexec provide a "dummy" inline function so that >> you don't have to have a #ifdef in a .c file? > > Greg, > > I am on vacation till next Tuesday. I will address your concern after I get > back if Vitaly > has not addressed it by then. I think the issue is not Hyper-V-related: we have native_machine_crash_shutdown() defined in asm/reboot.h but its implementation in kernel/crash.c is only being compiled with CONFIG_KEXEC. I suggest we fix it with something like the following: diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h index a82c4f1..6763e3e 100644 --- a/arch/x86/include/asm/reboot.h +++ b/arch/x86/include/asm/reboot.h @@ -16,8 +16,15 @@ struct machine_ops { extern struct machine_ops machine_ops; -void native_machine_crash_shutdown(struct pt_regs *regs); void native_machine_shutdown(void); +#ifdef CONFIG_KEXEC +void native_machine_crash_shutdown(struct pt_regs *regs); +#else +static inline void native_machine_crash_shutdown(struct pt_regs *regs) +{ + native_machine_shutdown(); +} +#endif void __noreturn machine_real_restart(unsigned int type); /* These must match dispatch in arch/x86/realmore/rm/reboot.S */ #define MRR_BIOS 0 I'll post a patch if there are no objections. -- Vitaly ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Ozwpan Driver: Removal Recommended
Hi Greg, We spoke about this several months ago. Since then, there has been no life from any of the maintainers or anybody at Atmel. Meanwhile Dan Carpenter has posted a patch for a security vulnerability in ozwpan that hasn't been reviewed or merged. There is nobody willing to maintain it. And nobody who has relevant hardware has even said "hello". All of my connections to ozwpan have yielded zero success in trying to find a maintainer or anybody with even remote expertise. Clearly this is dead in the water. I would thus recommend you remove this buggy, insecure, and unmaintained driver from the tree. It simply didn't pass the "staging test". Regards, Jason On Tue, Jun 2, 2015 at 1:35 PM, Jason A. Donenfeld wrote: > On Tue, Jun 2, 2015 at 3:35 AM, Greg Kroah-Hartman > wrote: >> I don't know, but I'm a bit loath to delete the driver from the tree as >> then people will just continue to use the version with all of the bugs. > > Yea, I understand that. Though, I'm pretty sure that most users of > ozwpan use old forks tied to old kernels, and do not use upstream > anyway. > >> If Atmel doesn't want to maintain the code anymore, do you want to do >> it? You can always send patches for this issue, as you seem to have the >> hardware and can do testing, which I can't. > > Thank you for the offer, and I would actually love to maintain a part > of the kernel. But I am likely the wrong man for ozwpan (inspite of > the Internet's claims of my wizardry [1]). The debugging I've done > thus far is on a readily available consumer embedded device, which I > was required to root and unsandbox and partake in other "security dark > magic" in order to get a decent debugging interface. My rig is rather > brittle and is likely to fall to pieces like aging solder at any > moment. I'd recommend this be maintained by someone with proper test > hardware and a suit of unit tests. This means: Atmel, or one of the > many clients to whom Atmel has sold high volumes of ozwpan chips. I'll > reach out where I can to see if I can find someone in a good position > to maintain it. > > [1] https://twitter.com/drgfragkos/status/598776229282578432 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Ozwpan Driver: Removal Recommended
On Mon, Aug 10, 2015 at 3:31 PM, Jason A. Donenfeld wrote: > Meanwhile Dan > Carpenter has posted a patch for a security vulnerability in ozwpan > that hasn't been reviewed or merged. Sorry, I see that you did in fact pick up this patch, so I retract that statement. Nonetheless, the remainder of the points in that email remain relevant. The maintainers are nowhere to be found. And it doesn't seem like anybody cares about it. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] ozwpan: The maintainers are MIA, so orphan
Ozwpan is completely unmaintained and potentially a security problem. As this is a staging driver, it should be removed, since it has been abandoned. Marking it as orphaned is the first step here. Signed-off-by: Jason A. Donenfeld --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2d3d55c..0e14772 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9717,7 +9717,7 @@ F:drivers/staging/olpc_dcon/ STAGING - OZMO DEVICES USB OVER WIFI DRIVER M: Shigekatsu Tateno -S: Maintained +S: Orphan F: drivers/staging/ozwpan/ STAGING - PARALLEL LCD/KEYPAD PANEL DRIVER -- 2.5.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 0/4] staging: lustre: split checkpatch fix for remote_perm.c into series
Split patch into series. Fix various coding style issue in remote_perm.c: [PATCH V2 1/4] staging: lustre: checkpatch: do not init global to NULL [PATCH V2 2/4] staging: lustre: checkpatch: symbol == NULL should be !symbol [PATCH V2 3/4] staging: lustre: checkpatch: move */ block comment to next line [PATCH V2 4/4] staging: lustre: checkpatch: argument alignment for readability ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 1/4] staging: lustre: checkpatch: do not init global to NULL
Fix checkpatch problem: remove NULL assignment fro global variable Signed-off-by: Swee Hua Law --- drivers/staging/lustre/lustre/llite/remote_perm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c index a581826..c9a7816 100644 --- a/drivers/staging/lustre/lustre/llite/remote_perm.c +++ b/drivers/staging/lustre/lustre/llite/remote_perm.c @@ -54,8 +54,8 @@ #include "../include/lustre_param.h" #include "llite_internal.h" -struct kmem_cache *ll_remote_perm_cachep = NULL; -struct kmem_cache *ll_rmtperm_hash_cachep = NULL; +struct kmem_cache *ll_remote_perm_cachep; +struct kmem_cache *ll_rmtperm_hash_cachep; static inline struct ll_remote_perm *alloc_ll_remote_perm(void) { -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 2/4] staging: lustre: checkpatch: symbol == NULL should be !symbol
Fix checkpatch problem: change == NULL comparison to !symbol Signed-off-by: Swee Hua Law --- drivers/staging/lustre/lustre/llite/remote_perm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c index c9a7816..aeda91a 100644 --- a/drivers/staging/lustre/lustre/llite/remote_perm.c +++ b/drivers/staging/lustre/lustre/llite/remote_perm.c @@ -184,7 +184,7 @@ int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm) if (!lli->lli_remote_perms) { perm_hash = alloc_rmtperm_hash(); - if (perm_hash == NULL) { + if (!perm_hash) { CERROR("alloc lli_remote_perms failed!\n"); return -ENOMEM; } @@ -287,7 +287,7 @@ int lustre_check_remote_perm(struct inode *inode, int mask) perm = req_capsule_server_swab_get(&req->rq_pill, &RMF_ACL, lustre_swab_mdt_remote_perm); - if (unlikely(perm == NULL)) { + if (unlikely(!perm)) { mutex_unlock(&lli->lli_rmtperm_mutex); rc = -EPROTO; break; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 3/4] staging: lustre: checkpatch: move */ block comment to next line
Fix checkpatch problem: move */ from end of line to new line Signed-off-by: Swee Hua Law --- drivers/staging/lustre/lustre/llite/remote_perm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c index aeda91a..49d78a3 100644 --- a/drivers/staging/lustre/lustre/llite/remote_perm.c +++ b/drivers/staging/lustre/lustre/llite/remote_perm.c @@ -117,7 +117,8 @@ static inline int remote_perm_hashfunc(uid_t uid) } /* NB: setxid permission is not checked here, instead it's done on - * MDT when client get remote permission. */ + * MDT when client get remote permission. + */ static int do_check_remote_perm(struct ll_inode_info *lli, int mask) { struct hlist_head *head; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2 4/4] staging: lustre: checkpatch: argument alignment for readability
Fix checkpatch problem: move last argument of the hlist..() back to same line Signed-off-by: Swee Hua Law --- drivers/staging/lustre/lustre/llite/remote_perm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c index 49d78a3..39022ea 100644 --- a/drivers/staging/lustre/lustre/llite/remote_perm.c +++ b/drivers/staging/lustre/lustre/llite/remote_perm.c @@ -104,8 +104,7 @@ void free_rmtperm_hash(struct hlist_head *hash) return; for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) - hlist_for_each_entry_safe(lrp, next, hash + i, - lrp_list) + hlist_for_each_entry_safe(lrp, next, hash + i, lrp_list) free_ll_remote_perm(lrp); OBD_SLAB_FREE(hash, ll_rmtperm_hash_cachep, REMOTE_PERM_HASHSIZE * sizeof(*hash)); @@ -322,8 +321,7 @@ void ll_free_remote_perms(struct inode *inode) spin_lock(&lli->lli_lock); for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) { - hlist_for_each_entry_safe(lrp, node, next, hash + i, - lrp_list) + hlist_for_each_entry_safe(lrp, node, next, hash + i, lrp_list) free_ll_remote_perm(lrp); } -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: lustre: llite: Added a new line after declaration
Added a new line to fix a coding style error no space after declaration detected by checkpatch. Signed-off-by: Aparna Karuthodi --- drivers/staging/lustre/lustre/llite/llite_capa.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c index aec9a44..a626871 100644 --- a/drivers/staging/lustre/lustre/llite/llite_capa.c +++ b/drivers/staging/lustre/lustre/llite/llite_capa.c @@ -140,6 +140,7 @@ static void sort_add_capa(struct obd_capa *ocapa, struct list_head *head) static inline int obd_capa_open_count(struct obd_capa *oc) { struct ll_inode_info *lli = ll_i2info(oc->u.cli.inode); + return atomic_read(&lli->lli_open_count); } -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc100: Remove pointer and integer comparision
On Mon, Aug 10, 2015 at 12:39:43PM +0300, Dan Carpenter wrote: > On Sun, Aug 09, 2015 at 08:50:02PM +0530, Chandra S Gorentla wrote: > > Removed pointer check with integer; this fixes 'sparse' error - > > error: incompatible types for operation (>) > >left side has type unsigned char [usertype] *[usertype] pu8Tail > >right side has type int > > > > Signed-off-by: Chandra S Gorentla > > --- > > drivers/staging/wilc1000/host_interface.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/wilc1000/host_interface.c > > b/drivers/staging/wilc1000/host_interface.c > > index cc549c2..4ba1ad7 100644 > > --- a/drivers/staging/wilc1000/host_interface.c > > +++ b/drivers/staging/wilc1000/host_interface.c > > @@ -3471,7 +3471,7 @@ static void Handle_AddBeacon(void *drvHandler, > > tstrHostIFSetBeacon *pstrSetBeaco > > *pu8CurrByte++ = ((pstrSetBeaconParam->u32TailLen >> 24) & 0xFF); > > > > /* Bug 4599 : if tail length = 0 skip copying */ > > - if (pstrSetBeaconParam->pu8Tail > 0) > > + if (pstrSetBeaconParam->pu8Tail != NULL) > > memcpy(pu8CurrByte, pstrSetBeaconParam->pu8Tail, > > pstrSetBeaconParam->u32TailLen); > > pu8CurrByte += pstrSetBeaconParam->u32TailLen; > > Warnings are a precious thing, because they show you where people are > lost. It's better to take a broader look at the code instead of *just* > silencing the warning. > > For example, the comment is nonsense. memcpy(anything, anything, 0); > is a no-op so it already would skip copying in that case. I wonder what > bug 4599 actually means... > > Also the next line is quite suspect. Even though we don't copy then we > are still incrementing the pu8CurrByte count? That seems wrong. > > So now let's consider if the memcpy() is correct. pu8CurrByte is > allocated at the start of the function. It should have space for > ->u32TailLen bytes, except for they seem to have forgotten about integer > overflow. I think ->u32TailLen is not trusted data so this could be a > security bug. Maybe you could exploit it by setting ->u32HeadLen to the > amount of memory you want to corrupt. Set ->u32TailLen to a high > number so it triggers an integer overflow. Set >pu8Tail to NULL so it > is doesn't just corrupt everything (DoS attack instead of privilege > escalation). > > I have just looked at the code so I don't know if this is true, but this > is how I read that warning. > > regards, > dan carpenter Hello Dan and Sudip, Thank you for reviewing the patch. At the outset - two points that happened outside this mail chain. 1. I sent a Version 2 of this Patch before I received your comments. I corrected subject line word wilc100 -> wilc1000. 2. Sudip Mucherjee (sudipm.mukher...@gmail.com) replied to the V2 of this patch and suggested to remove the '!=NULL'. In the current patch, I tried to fix (or silence) a 'sparse' error, it is not a warning. As you pointed out there may be some more problems in the function but can you explain why the error thrown by the 'sparse' should not be fixed? I agree with your suggestion that we need to take a broader look. Please help in understanding how does that broader look is suggesting that the patch is not addressing a right problem. The gcc version I am using is - 4.8.2. In the later part of your reply - you felt that there may be a case in which more than the allocated number of bytes may be copied in to the memory pointed to by 'pu8CurrByte' and memory may get corrupted. From the code in the function I am not seeing that happening. In the beginning of the function, this pointer variable is assigned a block of memory whose size is '->u32HeadLen' + '->u32TailLen' + 16. The function is copying 16 individual bytes to this memory; a smaller block of memory of size '->u32HeadLen' is being copied; and an another smaller block of memory of size '->u32TailLen' may be copied based on a condition. After this last copy, the function increments the pointer by '->u32TailLen' irrespective of last copy takes place or not. Hence I am not seeing any corruption of the memory. It looks like that the last increment is just an operation that does no harm. In addition to this the pointer variable 'pu8CurrByte' is just a local variable and it is not being used after the last increment operation of the pointer. After making the change in this patch I just did a 'make'. I do not have the hardware which this driver supports. So at this point of time, I cannot test your suggestions on wilc1000 hardware. Is there any way I can test this driver code on a old notebook computer? Thank you, chandra ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] ozwpan: The maintainers are MIA, so orphan
On Mon, Aug 10, 2015 at 03:47:19PM +0200, Jason A. Donenfeld wrote: > Ozwpan is completely unmaintained and potentially a security problem. As > this is a staging driver, it should be removed, since it has been > abandoned. Marking it as orphaned is the first step here. > > Signed-off-by: Jason A. Donenfeld > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 2d3d55c..0e14772 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -9717,7 +9717,7 @@ F: drivers/staging/olpc_dcon/ > > STAGING - OZMO DEVICES USB OVER WIFI DRIVER > M: Shigekatsu Tateno > -S: Maintained > +S: Orphan > F: drivers/staging/ozwpan/ As you are deleting the whole driver, this whole entry should be removed as well, marking it "Orphan" doesn't mean anything after your second patch. Just do it all in one patch, that makes more sense. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc100: Remove pointer and integer comparision
On Mon, Aug 10, 2015 at 08:59:43PM +0530, Chandra Gorentla wrote: > I agree with your suggestion > that we need to take a broader look. Please help in understanding > how does that broader look is suggesting that the patch is not > addressing a right problem. The gcc version I am using is - 4.8.2. > > In the later part of your reply - you felt that there may be a > case in which more than the allocated number of bytes may be > copied in to the memory pointed to by 'pu8CurrByte' and memory > may get corrupted. From the code in the function I am not seeing > that happening. In the beginning of the function, this pointer > variable is assigned a block of memory whose size is > '->u32HeadLen' + '->u32TailLen' + 16. > > The function is copying 16 individual bytes to this memory; > a smaller block of memory of size '->u32HeadLen' is being copied; > and an another smaller block of memory of size '->u32TailLen' may > be copied based on a condition. After this last copy, the > function increments the pointer by '->u32TailLen' irrespective > of last copy takes place or not. Hence I am not seeing any > corruption of the memory. It is an integer overflow. Try the test.c file I'll include below. > > It looks like that the last increment is just an operation that > does no harm. In addition to this the pointer variable > 'pu8CurrByte' is just a local variable and it is not being used > after the last increment operation of the pointer. It's a pointer to allocated memory. We call WILC_MALLOC(). This function allocates a buffer, then it copies memory over with the memcpy(). The "*pu8CurrByte++ = " statements are copying memory but doing endian conversion as well. (This is not the correct way to do endian conversion). > > After making the change in this patch I just did a 'make'. > I do not have the hardware which this driver supports. So at > this point of time, I cannot test your suggestions on wilc1000 > hardware. Is there any way I can test this driver code on a > old notebook computer? Don't worry too much about testing this. Just write small test programs to help you understand as much as possible. We are good at reviewing so you aren't going to break the code. #include int main(void) { unsigned int u32HeadLen; unsigned int u32TailLen; int s32ValueSize; u32HeadLen = 1000; u32TailLen = -1U - 500 - 16 + 1; s32ValueSize = u32HeadLen + u32TailLen + 16; printf("Allocating %d bytes.\n", s32ValueSize); printf("Copying %u bytes into a %d byte buffer will corrupt memory.\n", u32HeadLen, s32ValueSize); return 0; } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: ni_usb6501: fix possible out-of-bounds access
Coverity reports a possible Out-of-bounds access (ARRAY_VS_SINGLETON) with the 'const u8 *port' parameter passed to ni6501_port_command(). This param is an actual array for the SET_PORT_DIR operation, called by ni6501_dio_insn_config(). But for the WRITE_PORT and READ_PORT operations, called by ni6501_dio_insn_bits(), it is just the address of an u8 local variable. Fix the coverity issue by changing the parameter to an unsigned int and pass the raw values from ni6501_dio_insn_config() and ni6501_dio_insn_bits(). ni6501_port_command() then handles the masking and shifting needed to load the value into the u8 transmit buffer. For consistency, change the access of the 'bitmap' parameter from an array access to a pointer operation. Reported-by: coverity (CID 1248624) Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_usb6501.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_usb6501.c b/drivers/staging/comedi/drivers/ni_usb6501.c index 5f649f8..88de8da 100644 --- a/drivers/staging/comedi/drivers/ni_usb6501.c +++ b/drivers/staging/comedi/drivers/ni_usb6501.c @@ -172,7 +172,7 @@ struct ni6501_private { }; static int ni6501_port_command(struct comedi_device *dev, int command, - const u8 *port, u8 *bitmap) + unsigned int val, u8 *bitmap) { struct usb_device *usb = comedi_to_usb_dev(dev); struct ni6501_private *devpriv = dev->private; @@ -190,22 +190,22 @@ static int ni6501_port_command(struct comedi_device *dev, int command, request_size = sizeof(READ_PORT_REQUEST); response_size = sizeof(READ_PORT_RESPONSE); memcpy(tx, READ_PORT_REQUEST, request_size); - tx[14] = port[0]; + tx[14] = val & 0xff; break; case WRITE_PORT: request_size = sizeof(WRITE_PORT_REQUEST); response_size = sizeof(GENERIC_RESPONSE); memcpy(tx, WRITE_PORT_REQUEST, request_size); - tx[14] = port[0]; - tx[17] = bitmap[0]; + tx[14] = val & 0xff; + tx[17] = *bitmap; break; case SET_PORT_DIR: request_size = sizeof(SET_PORT_DIR_REQUEST); response_size = sizeof(GENERIC_RESPONSE); memcpy(tx, SET_PORT_DIR_REQUEST, request_size); - tx[14] = port[0]; - tx[15] = port[1]; - tx[16] = port[2]; + tx[14] = val & 0xff; + tx[15] = (val >> 8) & 0xff; + tx[16] = (val >> 16) & 0xff; break; default: ret = -EINVAL; @@ -235,7 +235,7 @@ static int ni6501_port_command(struct comedi_device *dev, int command, /* Check if results are valid */ if (command == READ_PORT) { - bitmap[0] = devpriv->usb_rx_buf[14]; + *bitmap = devpriv->usb_rx_buf[14]; /* mask bitmap for comparing */ devpriv->usb_rx_buf[14] = 0x00; @@ -349,17 +349,12 @@ static int ni6501_dio_insn_config(struct comedi_device *dev, unsigned int *data) { int ret; - u8 port[3]; ret = comedi_dio_insn_config(dev, s, insn, data, 0); if (ret) return ret; - port[0] = (s->io_bits) & 0xff; - port[1] = (s->io_bits >> 8) & 0xff; - port[2] = (s->io_bits >> 16) & 0xff; - - ret = ni6501_port_command(dev, SET_PORT_DIR, port, NULL); + ret = ni6501_port_command(dev, SET_PORT_DIR, s->io_bits, NULL); if (ret) return ret; @@ -382,7 +377,7 @@ static int ni6501_dio_insn_bits(struct comedi_device *dev, if (mask & (0xFF << port * 8)) { bitmap = (s->state >> port * 8) & 0xFF; ret = ni6501_port_command(dev, WRITE_PORT, - &port, &bitmap); + port, &bitmap); if (ret) return ret; } @@ -391,7 +386,7 @@ static int ni6501_dio_insn_bits(struct comedi_device *dev, data[1] = 0; for (port = 0; port < 3; port++) { - ret = ni6501_port_command(dev, READ_PORT, &port, &bitmap); + ret = ni6501_port_command(dev, READ_PORT, port, &bitmap); if (ret) return ret; data[1] |= bitmap << port * 8; -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc100: Remove pointer and integer comparision
On Mon, Aug 10, 2015 at 07:27:13PM +0300, Dan Carpenter wrote: > On Mon, Aug 10, 2015 at 08:59:43PM +0530, Chandra Gorentla wrote: > > I agree with your suggestion > > that we need to take a broader look. Please help in understanding > > how does that broader look is suggesting that the patch is not > > addressing a right problem. The gcc version I am using is - 4.8.2. > > > > In the later part of your reply - you felt that there may be a > > case in which more than the allocated number of bytes may be > > copied in to the memory pointed to by 'pu8CurrByte' and memory > > may get corrupted. From the code in the function I am not seeing > > that happening. In the beginning of the function, this pointer > > variable is assigned a block of memory whose size is > > '->u32HeadLen' + '->u32TailLen' + 16. > > > > The function is copying 16 individual bytes to this memory; > > a smaller block of memory of size '->u32HeadLen' is being copied; > > and an another smaller block of memory of size '->u32TailLen' may > > be copied based on a condition. After this last copy, the > > function increments the pointer by '->u32TailLen' irrespective > > of last copy takes place or not. Hence I am not seeing any > > corruption of the memory. > > It is an integer overflow. Try the test.c file I'll include below. > > > > > It looks like that the last increment is just an operation that > > does no harm. In addition to this the pointer variable > > 'pu8CurrByte' is just a local variable and it is not being used > > after the last increment operation of the pointer. > > It's a pointer to allocated memory. We call WILC_MALLOC(). > > This function allocates a buffer, then it copies memory over with the > memcpy(). The "*pu8CurrByte++ = " statements are copying memory but > doing endian conversion as well. (This is not the correct way to do > endian conversion). > > > > > After making the change in this patch I just did a 'make'. > > I do not have the hardware which this driver supports. So at > > this point of time, I cannot test your suggestions on wilc1000 > > hardware. Is there any way I can test this driver code on a > > old notebook computer? > > Don't worry too much about testing this. Just write small test programs > to help you understand as much as possible. We are good at reviewing so > you aren't going to break the code. > > #include > > int main(void) > { > unsigned int u32HeadLen; > unsigned int u32TailLen; > int s32ValueSize; > > u32HeadLen = 1000; > u32TailLen = -1U - 500 - 16 + 1; > s32ValueSize = u32HeadLen + u32TailLen + 16; > > printf("Allocating %d bytes.\n", s32ValueSize); > printf("Copying %u bytes into a %d byte buffer will corrupt memory.\n", > u32HeadLen, s32ValueSize); > > return 0; > } > > regards, > dan carpenter If the incoming parameters '->u32HeadLen' and '->u32TailLen' are not correct, they can cause corruption of memory. Is it not a different problem what the patch trying to fix? Thanks, chandra ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 03/14] staging: comedi: addi_apci_1564: define the APCI1564_DO_INT_CTRL_REG bits
On Friday, August 07, 2015 10:34 PM, Sudip Mukherjee wrote: > On Fri, Aug 07, 2015 at 11:45:03AM -0700, H Hartley Sweeten wrote: >> Define the bits in this register. Remove the old defines in hwdrv_apci1564.c. >> >> Signed-off-by: H Hartley Sweeten >> Cc: Ian Abbott >> Cc: Greg Kroah-Hartman >> --- > The #defines that are introduced in this patch and the next 2 patches > are not being used anywhere, even after the whole series is applied. > Then why having them now? someone else will can a patch to clean the > unused defines. Correct, they are not being used (yet). The addi_apci_1564 driver still needs a bit of cleanup in order to merge in the code from hwdrv_apci1564 and remove the ugly include of that file. Right now I'm not sure if these defines are going to be needed or not. To keep my head straight while doing the cleanup it's easier if the registers are fully defined. Also, the register definitions for the ADDI-DATA boards are not easily obtained. I got them direct from ADDI-DATA but the information is a but messy since it's, mostly, in German. Regards, Hartley ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc100: Remove pointer and integer comparision
Warnings are not a bad thing they are a valuable marker to let us know which code is broken. If we just silence the warning in the laziest possible way then we are throwing away valuable information. It's better to leave the warning there so that the next person can fix it properly. If you want to leave the code as-is that is absolutely fine with me, but don't remove the warning until someone can look at this a bit carefully. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/5] staging: comedi: comedi_fops: remove BUG_ON() checkes
Drivers should not crash the kernel. H Hartley Sweeten (5): staging: comedi: comedi_fops: absorb comedi_free_board_minor() staging: comedi: comedi_fops: remove BUG_ON() in comedi_dev_get_from_board_minor() staging: comedi: comedi_fops: remove BUG_ON() in comedi_free_subdevice_minor() staging: comedi: comedi_fops: remove BUG_ON() in comedi_cleanup() staging: comedi: comedi_fops: remove remaining BUG_ON() checks drivers/staging/comedi/comedi_fops.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/5] staging: comedi: comedi_fops: remove BUG_ON() in comedi_cleanup()
The BUG_ON() checks in this function are not necessary. comedi_cleanup_board_minors() clears all the entries in the comedi_board_minor_table array and will call comedi_device_cleanup() for all attached devices. comedi_device_cleanup() will then clear the entries in the comedi_subdevice_minor_table array with comedi_free_subdevice_minor(). Remove the BUG_ON(), drivers should not crash the kernel. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index dbca28f..f4dc7a3 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2926,14 +2926,7 @@ module_init(comedi_init); static void __exit comedi_cleanup(void) { - int i; - comedi_cleanup_board_minors(); - for (i = 0; i < COMEDI_NUM_BOARD_MINORS; ++i) - BUG_ON(comedi_board_minor_table[i]); - for (i = 0; i < COMEDI_NUM_SUBDEVICE_MINORS; ++i) - BUG_ON(comedi_subdevice_minor_table[i]); - class_destroy(comedi_class); cdev_del(&comedi_cdev); unregister_chrdev_region(MKDEV(COMEDI_MAJOR, 0), COMEDI_NUM_MINORS); -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] staging: comedi: comedi_fops: remove BUG_ON() in comedi_free_subdevice_minor()
Drivers should not crash the kernel. This function is only called by comedi_device_detach_cleanup() and the s->minor will always be valid or the device wouldn't have attached in the first place. Leave the checks for safety in accessing the comedi_subdevice_minor_table array but remove the BUG_ON() calls. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index a49b385..dbca28f 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2831,12 +2831,10 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s) if (!s) return; - if (s->minor < 0) + if (s->minor < COMEDI_NUM_BOARD_MINORS || + s->minor >= COMEDI_NUM_MINORS) return; - BUG_ON(s->minor >= COMEDI_NUM_MINORS); - BUG_ON(s->minor < COMEDI_NUM_BOARD_MINORS); - i = s->minor - COMEDI_NUM_BOARD_MINORS; mutex_lock(&comedi_subdevice_minor_table_lock); if (s == comedi_subdevice_minor_table[i]) -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] staging: comedi: comedi_fops: remove BUG_ON() in comedi_dev_get_from_board_minor()
This function is only called by comedi_dev_get_from_minor() and the 'minor' value will always be < COMEDI_NUM_BOARD_MINORS. Remove the unnecessary BUG_ON(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 992e367..a49b385 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -228,7 +228,6 @@ static struct comedi_device *comedi_dev_get_from_board_minor(unsigned minor) { struct comedi_device *dev; - BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS); mutex_lock(&comedi_board_minor_table_lock); dev = comedi_dev_get(comedi_board_minor_table[minor]); mutex_unlock(&comedi_board_minor_table_lock); -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] staging: comedi: comedi_fops: absorb comedi_free_board_minor()
This function is only called by comedi_cleanup_board_minors() and the 'minor' parameter will always be < COMEDI_NUM_BOARD_MINORS. For aesthetics, absorb the function and remove the unnecessary BUG_ON(). Split the comedi_clear_board_minor() out to clarify that the return value is a comedi_device pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 2ba9cdb..992e367 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2777,12 +2777,6 @@ struct comedi_device *comedi_alloc_board_minor(struct device *hardware_device) return dev; } -static void comedi_free_board_minor(unsigned minor) -{ - BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS); - comedi_free_board_dev(comedi_clear_board_minor(minor)); -} - void comedi_release_hardware_device(struct device *hardware_device) { int minor; @@ -2857,10 +2851,13 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s) static void comedi_cleanup_board_minors(void) { + struct comedi_device *dev; unsigned i; - for (i = 0; i < COMEDI_NUM_BOARD_MINORS; i++) - comedi_free_board_minor(i); + for (i = 0; i < COMEDI_NUM_BOARD_MINORS; i++) { + dev = comedi_clear_board_minor(i); + comedi_free_board_dev(dev); + } } static int __init comedi_init(void) -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/5] staging: comedi: comedi_fops: remove remaining BUG_ON() checks
The BUG_ON() checks in comedi_subdevice_from_minor() and comedi_dev_get_from_subdevice_minor() are not necessary. The 'minor' numbers for a given comedi driver are setup by comedi_dev_get_from_subdevice_minor() and will always be in the correct range. Drivers should not crash the kernel, remove the BUG_ON() checks. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index f4dc7a3..0e8a451 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -215,7 +215,6 @@ static struct comedi_subdevice struct comedi_subdevice *s; unsigned int i = minor - COMEDI_NUM_BOARD_MINORS; - BUG_ON(i >= COMEDI_NUM_SUBDEVICE_MINORS); mutex_lock(&comedi_subdevice_minor_table_lock); s = comedi_subdevice_minor_table[i]; if (s && s->device != dev) @@ -240,7 +239,6 @@ static struct comedi_device *comedi_dev_get_from_subdevice_minor(unsigned minor) struct comedi_subdevice *s; unsigned int i = minor - COMEDI_NUM_BOARD_MINORS; - BUG_ON(i >= COMEDI_NUM_SUBDEVICE_MINORS); mutex_lock(&comedi_subdevice_minor_table_lock); s = comedi_subdevice_minor_table[i]; dev = comedi_dev_get(s ? s->device : NULL); -- 2.4.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/19] staging: iio: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/iio/meter/ade7854.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/meter/ade7854.h b/drivers/staging/iio/meter/ade7854.h index 52ca541..52f4195 100644 --- a/drivers/staging/iio/meter/ade7854.h +++ b/drivers/staging/iio/meter/ade7854.h @@ -168,7 +168,7 @@ struct ade7854_state { }; -extern int ade7854_probe(struct iio_dev *indio_dev, struct device *dev); -extern int ade7854_remove(struct iio_dev *indio_dev); +int ade7854_probe(struct iio_dev *indio_dev, struct device *dev); +int ade7854_remove(struct iio_dev *indio_dev); #endif -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/19] staging: most: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/most/hdm-dim2/dim2_hal.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h b/drivers/staging/most/hdm-dim2/dim2_hal.h index d88b5a0..8929af9 100644 --- a/drivers/staging/most/hdm-dim2/dim2_hal.h +++ b/drivers/staging/most/hdm-dim2/dim2_hal.h @@ -108,13 +108,13 @@ bool DIM_DetachBuffers(struct dim_channel *ch, u16 buffers_number); u32 DIM_ReadRegister(u8 register_index); -extern u32 DIMCB_IoRead(u32 *ptr32); +u32 DIMCB_IoRead(u32 *ptr32); -extern void DIMCB_IoWrite(u32 *ptr32, u32 value); +void DIMCB_IoWrite(u32 *ptr32, u32 value); -extern void DIMCB_OnError(u8 error_id, const char *error_message); +void DIMCB_OnError(u8 error_id, const char *error_message); -extern void DIMCB_OnFail(const char *filename, int linenum); +void DIMCB_OnFail(const char *filename, int linenum); #ifdef __cplusplus -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/19] staging: netlogic: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/netlogic/xlr_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/netlogic/xlr_net.h b/drivers/staging/netlogic/xlr_net.h index 13e03f0..2f65ec5 100644 --- a/drivers/staging/netlogic/xlr_net.h +++ b/drivers/staging/netlogic/xlr_net.h @@ -1102,4 +1102,4 @@ struct xlr_net_priv { u64 *class_3_spill; }; -extern void xlr_set_gmac_speed(struct xlr_net_priv *priv); +void xlr_set_gmac_speed(struct xlr_net_priv *priv); -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/19] staging: Remove unnecessary externs
trivial neatening of prototypes Joe Perches (19): staging: android: Remove unnecessary externs staging: dgnc: Remove unnecessary externs staging: fbtft: Remove unnecessary externs staging: ft1000: Remove unnecessary externs staging: iio: Remove unnecessary externs staging: lustre: Remove unnecessary externs staging: most: Remove unnecessary externs staging: mt29f_spinand: Remove unnecessary externs staging: netlogic: Remove unnecessary externs staging: nvec: Remove unnecessary externs staging: octeon: Remove unnecessary externs staging: olpc_dcon: Remove unnecessary externs staging: rtl8188eu: Remove unnecessary externs staging: rtl8192e: Remove unnecessary externs staging: rtl8192u: Remove unnecessary externs staging: rtl8712: Remove unnecessary externs staging: speakup: Remove unnecessary externs staging: wilc1000: Remove unnecessary externs staging: xgifb: Remove unnecessary externs drivers/staging/android/sync.h | 10 +- drivers/staging/dgnc/dgnc_sysfs.h | 16 +- drivers/staging/fbtft/fbtft.h | 52 ++- drivers/staging/ft1000/ft1000-pcmcia/ft1000.h | 19 +- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 4 +- drivers/staging/iio/meter/ade7854.h| 4 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h| 2 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h| 141 + drivers/staging/lustre/lnet/selftest/console.h | 90 +++--- .../staging/lustre/lustre/include/lprocfs_status.h | 313 +-- .../lustre/lustre/include/lustre/lustre_idl.h | 133 .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 +- .../staging/lustre/lustre/include/lustre_export.h | 4 +- .../staging/lustre/lustre/include/lustre_import.h | 4 +- drivers/staging/lustre/lustre/include/lustre_net.h | 16 +- drivers/staging/lustre/lustre/include/obd_class.h | 16 +- .../staging/lustre/lustre/include/obd_support.h| 6 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/libcfs/tracefile.h | 32 +- .../staging/lustre/lustre/llite/llite_internal.h | 16 +- drivers/staging/most/hdm-dim2/dim2_hal.h | 8 +- drivers/staging/mt29f_spinand/mt29f_spinand.h | 4 +- drivers/staging/netlogic/xlr_net.h | 2 +- drivers/staging/nvec/nvec.h| 19 +- drivers/staging/octeon/ethernet-mdio.h | 2 +- drivers/staging/octeon/octeon-ethernet.h | 22 +- drivers/staging/olpc_dcon/olpc_dcon.h | 2 +- drivers/staging/rtl8188eu/include/osdep_service.h | 2 +- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 8 +- drivers/staging/rtl8188eu/include/sta_info.h | 18 +- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h | 10 +- drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.h | 4 +- .../staging/rtl8192e/rtl8192e/r8192E_firmware.h| 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 52 ++- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 22 +- drivers/staging/rtl8192e/rtllib.h | 347 ++--- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 345 ++-- drivers/staging/rtl8192u/r8190_rtl8256.h | 11 +- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_dm.h | 36 +-- drivers/staging/rtl8192u/r8192U_wx.h | 2 +- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 8 +- drivers/staging/rtl8192u/r819xU_phy.h | 55 ++-- drivers/staging/rtl8712/rtl871x_ioctl.h| 28 +- drivers/staging/speakup/i18n.h | 12 +- drivers/staging/speakup/speakup.h | 68 ++-- drivers/staging/wilc1000/coreconfigurator.h| 30 +- drivers/staging/wilc1000/linux_wlan_common.h | 4 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- drivers/staging/xgifb/vb_init.h| 4 +- drivers/staging/xgifb/vb_setmode.h | 34 +- 52 files changed, 1007 insertions(+), 1042 deletions(-) -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/19] staging: android: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/android/sync.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h index a21b79f..61f8a3a 100644 --- a/drivers/staging/android/sync.h +++ b/drivers/staging/android/sync.h @@ -337,11 +337,11 @@ int sync_fence_wait(struct sync_fence *fence, long timeout); #ifdef CONFIG_DEBUG_FS -extern void sync_timeline_debug_add(struct sync_timeline *obj); -extern void sync_timeline_debug_remove(struct sync_timeline *obj); -extern void sync_fence_debug_add(struct sync_fence *fence); -extern void sync_fence_debug_remove(struct sync_fence *fence); -extern void sync_dump(void); +void sync_timeline_debug_add(struct sync_timeline *obj); +void sync_timeline_debug_remove(struct sync_timeline *obj); +void sync_fence_debug_add(struct sync_fence *fence); +void sync_fence_debug_remove(struct sync_fence *fence); +void sync_dump(void); #else # define sync_timeline_debug_add(obj) -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/19] staging: olpc_dcon: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/olpc_dcon/olpc_dcon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon.h b/drivers/staging/olpc_dcon/olpc_dcon.h index aec9895..d06e19d 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.h +++ b/drivers/staging/olpc_dcon/olpc_dcon.h @@ -98,7 +98,7 @@ struct dcon_platform_data { #include -extern irqreturn_t dcon_interrupt(int irq, void *id); +irqreturn_t dcon_interrupt(int irq, void *id); #ifdef CONFIG_FB_OLPC_DCON_1 extern struct dcon_platform_data dcon_pdata_xo_1; -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/19] staging: rtl8192u: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 345 + drivers/staging/rtl8192u/r8190_rtl8256.h | 11 +- drivers/staging/rtl8192u/r8192U.h | 2 +- drivers/staging/rtl8192u/r8192U_dm.h | 36 +-- drivers/staging/rtl8192u/r8192U_wx.h | 2 +- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 8 +- drivers/staging/rtl8192u/r819xU_phy.h | 55 ++-- 7 files changed, 236 insertions(+), 223 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 23af2aa..d481a26 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2169,98 +2169,99 @@ static inline int ieee80211_is_cck_rate(u8 rate) /* ieee80211.c */ -extern void free_ieee80211(struct net_device *dev); -extern struct net_device *alloc_ieee80211(int sizeof_priv); +void free_ieee80211(struct net_device *dev); +struct net_device *alloc_ieee80211(int sizeof_priv); -extern int ieee80211_set_encryption(struct ieee80211_device *ieee); +int ieee80211_set_encryption(struct ieee80211_device *ieee); /* ieee80211_tx.c */ -extern int ieee80211_encrypt_fragment( - struct ieee80211_device *ieee, - struct sk_buff *frag, - int hdr_len); +int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, + struct sk_buff *frag, int hdr_len); -extern int ieee80211_xmit(struct sk_buff *skb, - struct net_device *dev); -extern void ieee80211_txb_free(struct ieee80211_txb *); +int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); +void ieee80211_txb_free(struct ieee80211_txb *); /* ieee80211_rx.c */ -extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, - struct ieee80211_rx_stats *rx_stats); -extern void ieee80211_rx_mgt(struct ieee80211_device *ieee, -struct rtl_80211_hdr_4addr *header, -struct ieee80211_rx_stats *stats); +int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, +struct ieee80211_rx_stats *rx_stats); +void ieee80211_rx_mgt(struct ieee80211_device *ieee, + struct rtl_80211_hdr_4addr *header, + struct ieee80211_rx_stats *stats); /* ieee80211_wx.c */ -extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee, -struct iw_request_info *info, -union iwreq_data *wrqu, char *key); -extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee, - struct iw_request_info *info, - union iwreq_data *wrqu, char *key); -extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee, - struct iw_request_info *info, - union iwreq_data *wrqu, char *key); -extern int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee, +int ieee80211_wx_get_scan(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *key); +int ieee80211_wx_set_encode(struct ieee80211_device *ieee, struct iw_request_info *info, - union iwreq_data *wrqu, char *extra); -extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee, + union iwreq_data *wrqu, char *key); +int ieee80211_wx_get_encode(struct ieee80211_device *ieee, struct iw_request_info *info, - union iwreq_data *wrqu, char *extra); -extern int ieee80211_wx_set_auth(struct ieee80211_device *ieee, - struct iw_request_info *info, - struct iw_param *data, char *extra); -extern int ieee80211_wx_set_mlme(struct ieee80211_device *ieee, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra); -extern int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len); + union iwreq_data *wrqu, char *key); +int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); +int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); +int ieee80211_wx_set_auth(struct ieee80211_device *ieee, + struct iw_request_info *info, + struct iw_param *data, char *extra); +int ie
[PATCH 17/19] staging: speakup: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- drivers/staging/speakup/i18n.h| 12 +++ drivers/staging/speakup/speakup.h | 68 +++ 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/drivers/staging/speakup/i18n.h b/drivers/staging/speakup/i18n.h index 326d086..8fcce56 100644 --- a/drivers/staging/speakup/i18n.h +++ b/drivers/staging/speakup/i18n.h @@ -224,11 +224,11 @@ struct msg_group_t { enum msg_index_t end; }; -extern char *spk_msg_get(enum msg_index_t index); -extern ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length); -extern struct msg_group_t *spk_find_msg_group(const char *group_name); -extern void spk_reset_msg_group(struct msg_group_t *group); -extern void spk_initialize_msgs(void); -extern void spk_free_user_msgs(void); +char *spk_msg_get(enum msg_index_t index); +ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length); +struct msg_group_t *spk_find_msg_group(const char *group_name); +void spk_reset_msg_group(struct msg_group_t *group); +void spk_initialize_msgs(void); +void spk_free_user_msgs(void); #endif diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h index a7f4962..df74c91 100644 --- a/drivers/staging/speakup/speakup.h +++ b/drivers/staging/speakup/speakup.h @@ -42,46 +42,44 @@ #define IS_CHAR(x, type) (spk_chartab[((u_char)x)]&type) #define IS_TYPE(x, type) ((spk_chartab[((u_char)x)]&type) == type) -extern int speakup_thread(void *data); -extern void spk_reset_default_chars(void); -extern void spk_reset_default_chartab(void); -extern void synth_start(void); +int speakup_thread(void *data); +void spk_reset_default_chars(void); +void spk_reset_default_chartab(void); +void synth_start(void); void synth_insert_next_index(int sent_num); void spk_reset_index_count(int sc); void spk_get_index_count(int *linecount, int *sentcount); -extern int spk_set_key_info(const u_char *key_info, u_char *k_buffer); -extern char *spk_strlwr(char *s); -extern char *spk_s2uchar(char *start, char *dest); -extern int speakup_kobj_init(void); -extern void speakup_kobj_exit(void); -extern int spk_chartab_get_value(char *keyword); -extern void speakup_register_var(struct var_t *var); -extern void speakup_unregister_var(enum var_id_t var_id); -extern struct st_var_header *spk_get_var_header(enum var_id_t var_id); -extern struct st_var_header *spk_var_header_by_name(const char *name); -extern struct punc_var_t *spk_get_punc_var(enum var_id_t var_id); -extern int spk_set_num_var(int val, struct st_var_header *var, int how); -extern int spk_set_string_var(const char *page, struct st_var_header *var, - int len); -extern int spk_set_mask_bits(const char *input, const int which, const int how); +int spk_set_key_info(const u_char *key_info, u_char *k_buffer); +char *spk_strlwr(char *s); +char *spk_s2uchar(char *start, char *dest); +int speakup_kobj_init(void); +void speakup_kobj_exit(void); +int spk_chartab_get_value(char *keyword); +void speakup_register_var(struct var_t *var); +void speakup_unregister_var(enum var_id_t var_id); +struct st_var_header *spk_get_var_header(enum var_id_t var_id); +struct st_var_header *spk_var_header_by_name(const char *name); +struct punc_var_t *spk_get_punc_var(enum var_id_t var_id); +int spk_set_num_var(int val, struct st_var_header *var, int how); +int spk_set_string_var(const char *page, struct st_var_header *var, int len); +int spk_set_mask_bits(const char *input, const int which, const int how); extern special_func spk_special_handler; -extern int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, - u_short key); -extern int synth_init(char *name); -extern void synth_release(void); +int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key); +int synth_init(char *name); +void synth_release(void); -extern void spk_do_flush(void); -extern void speakup_start_ttys(void); -extern void synth_buffer_add(char ch); -extern void synth_buffer_clear(void); -extern void speakup_clear_selection(void); -extern int speakup_set_selection(struct tty_struct *tty); -extern int speakup_paste_selection(struct tty_struct *tty); -extern void speakup_cancel_paste(void); -extern void speakup_register_devsynth(void); -extern void speakup_unregister_devsynth(void); -extern void synth_write(const char *buf, size_t count); -extern int synth_supports_indexing(void); +void spk_do_flush(void); +void speakup_start_ttys(void); +void synth_buffer_add(char ch); +void synth_buffer_clear(void); +void speakup_clear_selection(void); +int speakup_set_selection(struct tty_struct *tty); +int speakup_paste_selection(struct tty_struct *tty); +void speakup_cancel_paste(void); +void speakup_register_devsynth(void); +void speakup_unregister_devsynth(void); +void synth_write(const char *buf, size_t count); +int synth_support
[PATCH 08/19] staging: mt29f_spinand: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/mt29f_spinand/mt29f_spinand.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.h b/drivers/staging/mt29f_spinand/mt29f_spinand.h index 7f2c24d..6c8e413 100644 --- a/drivers/staging/mt29f_spinand/mt29f_spinand.h +++ b/drivers/staging/mt29f_spinand/mt29f_spinand.h @@ -101,7 +101,7 @@ struct spinand_cmd { u8 *rx_buf;/* Rx buf */ }; -extern int spinand_mtd(struct mtd_info *mtd); -extern void spinand_mtd_release(struct mtd_info *mtd); +int spinand_mtd(struct mtd_info *mtd); +void spinand_mtd_release(struct mtd_info *mtd); #endif /* __LINUX_MTD_SPI_NAND_H */ -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/19] staging: dgnc: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/dgnc/dgnc_sysfs.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_sysfs.h b/drivers/staging/dgnc/dgnc_sysfs.h index be0f90a..7be7d55 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.h +++ b/drivers/staging/dgnc/dgnc_sysfs.h @@ -25,16 +25,16 @@ struct un_t; struct pci_driver; struct class_device; -extern void dgnc_create_ports_sysfiles(struct dgnc_board *bd); -extern void dgnc_remove_ports_sysfiles(struct dgnc_board *bd); +void dgnc_create_ports_sysfiles(struct dgnc_board *bd); +void dgnc_remove_ports_sysfiles(struct dgnc_board *bd); -extern void dgnc_create_driver_sysfiles(struct pci_driver *); -extern void dgnc_remove_driver_sysfiles(struct pci_driver *); +void dgnc_create_driver_sysfiles(struct pci_driver *); +void dgnc_remove_driver_sysfiles(struct pci_driver *); -extern int dgnc_tty_class_init(void); -extern int dgnc_tty_class_destroy(void); +int dgnc_tty_class_init(void); +int dgnc_tty_class_destroy(void); -extern void dgnc_create_tty_sysfs(struct un_t *un, struct device *c); -extern void dgnc_remove_tty_sysfs(struct device *c); +void dgnc_create_tty_sysfs(struct un_t *un, struct device *c); +void dgnc_remove_tty_sysfs(struct device *c); #endif -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/19] staging: ft1000: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignment Signed-off-by: Joe Perches --- drivers/staging/ft1000/ft1000-pcmcia/ft1000.h | 19 +-- drivers/staging/ft1000/ft1000-usb/ft1000_usb.h | 4 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000.h b/drivers/staging/ft1000/ft1000-pcmcia/ft1000.h index 5992670..e1861cf 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000.h +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000.h @@ -42,17 +42,16 @@ struct ft1000_pcmcia { struct pcmcia_device; struct net_device; -extern struct net_device *init_ft1000_card(struct pcmcia_device *link, - void *ft1000_reset); -extern void stop_ft1000_card(struct net_device *dev); -extern int card_download(struct net_device *dev, const u8 *pFileStart, -size_t FileLength); +struct net_device *init_ft1000_card(struct pcmcia_device *link, + void *ft1000_reset); +void stop_ft1000_card(struct net_device *dev); +int card_download(struct net_device *dev, const u8 *pFileStart, + size_t FileLength); -extern u16 ft1000_read_dpram(struct net_device *dev, int offset); -extern void card_bootload(struct net_device *dev); -extern u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, - int Index); -extern u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset); +u16 ft1000_read_dpram(struct net_device *dev, int offset); +void card_bootload(struct net_device *dev); +u16 ft1000_read_dpram_mag_16(struct net_device *dev, int offset, int Index); +u32 ft1000_read_dpram_mag_32(struct net_device *dev, int offset); void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value); /* Read the value of a given ASIC register. */ diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h index fea60d5..9b5050f 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h @@ -134,8 +134,8 @@ extern spinlock_t free_buff_lock; int ft1000_create_dev(struct ft1000_usb *dev); void ft1000_destroy_dev(struct net_device *dev); -extern int card_send_command(struct ft1000_usb *ft1000dev, -void *ptempbuffer, int size); +int card_send_command(struct ft1000_usb *ft1000dev, + void *ptempbuffer, int size); struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist); void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist); -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/19] staging: rtl8192e: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h | 10 +- drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.h | 4 +- .../staging/rtl8192e/rtl8192e/r8192E_firmware.h| 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 52 ++- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 22 +- drivers/staging/rtl8192e/rtllib.h | 347 ++--- 6 files changed, 202 insertions(+), 235 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h index 5af837f..3e4363f 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h @@ -21,10 +21,10 @@ #define RTL8225H #define RTL819X_TOTAL_RF_PATH 2 -extern void rtl92e_set_bandwidth(struct net_device *dev, -enum ht_channel_width Bandwidth); -extern bool rtl92e_config_rf(struct net_device *dev); -extern void rtl92e_set_cck_tx_power(struct net_device *dev, u8 powerlevel); -extern void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel); +void rtl92e_set_bandwidth(struct net_device *dev, + enum ht_channel_width Bandwidth); +bool rtl92e_config_rf(struct net_device *dev); +void rtl92e_set_cck_tx_power(struct net_device *dev, u8powerlevel); +void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel); #endif diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.h index 5718fd8..2a8b165c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.h @@ -19,6 +19,6 @@ #ifndef R819XUSB_CMDPKT_H #define R819XUSB_CMDPKT_H -extern bool rtl92e_send_cmd_pkt(struct net_device *dev, u8 *codevirtualaddress, - u32 packettype, u32 buffer_len); +bool rtl92e_send_cmd_pkt(struct net_device *dev, u8 *codevirtualaddress, +u32 packettype, u32 buffer_len); #endif diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.h index 4c464ea..fa760f7 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.h @@ -60,6 +60,6 @@ struct rt_firmware { }; bool rtl92e_init_fw(struct net_device *dev); -extern void rtl92e_init_fw_param(struct net_device *dev); +void rtl92e_init_fw_param(struct net_device *dev); #endif diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h index 350d306..96015d3 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h @@ -67,40 +67,36 @@ enum rf90_radio_path { #define bMaskLWord0x #define bMaskDWord0x -extern u8 rtl92e_is_legal_rf_path(struct net_device *dev, u32 eRFPath); -extern void rtl92e_set_bb_reg(struct net_device *dev, u32 dwRegAddr, - u32 dwBitMask, u32 dwData); -extern u32 rtl92e_get_bb_reg(struct net_device *dev, u32 dwRegAddr, -u32 dwBitMask); -extern void rtl92e_set_rf_reg(struct net_device *dev, - enum rf90_radio_path eRFPath, u32 RegAddr, - u32 BitMask, u32 Data); -extern u32 rtl92e_get_rf_reg(struct net_device *dev, -enum rf90_radio_path eRFPath, u32 RegAddr, -u32 BitMask); -extern void rtl92e_config_mac(struct net_device *dev); -extern bool rtl92e_check_bb_and_rf(struct net_device *dev, - enum hw90_block CheckBlock, - enum rf90_radio_path eRFPath); -extern bool rtl92e_config_bb(struct net_device *dev); -extern void rtl92e_get_tx_power(struct net_device *dev); -extern void rtl92e_set_tx_power(struct net_device *dev, u8 channel); -extern bool rtl92e_config_phy(struct net_device *dev); -extern u8 rtl92e_config_rf_path(struct net_device *dev, - enum rf90_radio_path eRFPath); +u8 rtl92e_is_legal_rf_path(struct net_device *dev, u32 eRFPath); +void rtl92e_set_bb_reg(struct net_device *dev, u32 dwRegAddr, + u32 dwBitMask, u32 dwData); +u32 rtl92e_get_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask); +void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, + u32 RegAddr, u32 BitMask, u32 Data); +u32 rtl92e_get_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, + u32 RegAddr, u32 BitMask); +void rtl92e_config_mac(struct net_device *dev); +bool rtl92e_check_bb_and_rf(struct net_device *dev, + enum hw90_block CheckBlock, +
[PATCH 18/19] staging: wilc1000: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- drivers/staging/wilc1000/coreconfigurator.h | 30 +++ drivers/staging/wilc1000/linux_wlan_common.h | 4 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 56ff2ba..3af1935 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -163,27 +163,27 @@ typedef struct wid_site_survey_reslts { } wid_site_survey_reslts_s; #endif -extern s32 CoreConfiguratorInit(void); -extern s32 CoreConfiguratorDeInit(void); +s32 CoreConfiguratorInit(void); +s32 CoreConfiguratorDeInit(void); -extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, -u32 u32WIDsCount, bool bRespRequired, u32 drvHandler); -extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); -extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); +s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs, + u32 u32WIDsCount, bool bRespRequired, u32 drvHandler); +s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); +s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo); -extern s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, - tstrConnectRespInfo **ppstrConnectRespInfo); -extern s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo); +s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen, + tstrConnectRespInfo **ppstrConnectRespInfo); +s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo); #ifndef CONNECT_DIRECT -extern s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], - wid_site_survey_reslts_s **ppstrSurveyResults, - u32 *pu32SurveyResultsCount); -extern s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); +s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], + wid_site_survey_reslts_s **ppstrSurveyResults, + u32 *pu32SurveyResultsCount); +s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults); #endif -extern s32 SendRawPacket(s8 *pspacket, s32 s32PacketLen); -extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); +s32 SendRawPacket(s8 *pspacket, s32 s32PacketLen); +void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length); void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length); void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h index 2476bfd..e6ebf3e 100644 --- a/drivers/staging/wilc1000/linux_wlan_common.h +++ b/drivers/staging/wilc1000/linux_wlan_common.h @@ -39,8 +39,8 @@ enum debug_region { #define FIRM_DBG(1 << Firmware_debug) #if defined (WILC_DEBUGFS) -extern int wilc_debugfs_init(void); -extern void wilc_debugfs_remove(void); +int wilc_debugfs_init(void); +void wilc_debugfs_remove(void); extern atomic_t REGION; extern atomic_t DEBUG_LEVEL; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h index c25350c..97b663b 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h @@ -123,7 +123,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi #ifdef TCP_ENHANCEMENTS #define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 #define DEFAULT_LINK_SPEED 72 -extern void Enable_TCP_ACK_Filter(bool value); +void Enable_TCP_ACK_Filter(bool value); #endif #endif -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/19] staging: lustre: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h| 2 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h| 141 +- drivers/staging/lustre/lnet/selftest/console.h | 90 +++--- .../staging/lustre/lustre/include/lprocfs_status.h | 313 ++--- .../lustre/lustre/include/lustre/lustre_idl.h | 133 - .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 +- .../staging/lustre/lustre/include/lustre_export.h | 4 +- .../staging/lustre/lustre/include/lustre_import.h | 4 +- drivers/staging/lustre/lustre/include/lustre_net.h | 16 +- drivers/staging/lustre/lustre/include/obd_class.h | 16 +- .../staging/lustre/lustre/include/obd_support.h| 6 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/libcfs/tracefile.h | 32 +-- .../staging/lustre/lustre/llite/llite_internal.h | 16 +- 15 files changed, 387 insertions(+), 392 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index 8bc0577..deeec5e 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -642,7 +642,7 @@ typedef struct kib_peer { extern kib_data_t kiblnd_data; -extern void kiblnd_hdev_destroy(kib_hca_dev_t *hdev); +void kiblnd_hdev_destroy(kib_hca_dev_t *hdev); static inline void kiblnd_hdev_addref_locked(kib_hca_dev_t *hdev) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h index cb91e68..a0fcbc3 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h @@ -520,8 +520,8 @@ ksocknal_conn_addref(ksock_conn_t *conn) atomic_inc(&conn->ksnc_conn_refcount); } -extern void ksocknal_queue_zombie_conn(ksock_conn_t *conn); -extern void ksocknal_finalize_zcreq(ksock_conn_t *conn); +void ksocknal_queue_zombie_conn(ksock_conn_t *conn); +void ksocknal_finalize_zcreq(ksock_conn_t *conn); static inline void ksocknal_conn_decref(ksock_conn_t *conn) @@ -566,8 +566,8 @@ ksocknal_tx_addref(ksock_tx_t *tx) atomic_inc(&tx->tx_refcount); } -extern void ksocknal_tx_prep(ksock_conn_t *, ksock_tx_t *tx); -extern void ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx); +void ksocknal_tx_prep(ksock_conn_t *, ksock_tx_t *tx); +void ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx); static inline void ksocknal_tx_decref(ksock_tx_t *tx) @@ -584,7 +584,7 @@ ksocknal_route_addref(ksock_route_t *route) atomic_inc(&route->ksnr_refcount); } -extern void ksocknal_destroy_route(ksock_route_t *route); +void ksocknal_destroy_route(ksock_route_t *route); static inline void ksocknal_route_decref(ksock_route_t *route) @@ -601,7 +601,7 @@ ksocknal_peer_addref(ksock_peer_t *peer) atomic_inc(&peer->ksnp_refcount); } -extern void ksocknal_destroy_peer(ksock_peer_t *peer); +void ksocknal_destroy_peer(ksock_peer_t *peer); static inline void ksocknal_peer_decref(ksock_peer_t *peer) @@ -621,70 +621,69 @@ int ksocknal_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, unsigned int offset, unsigned int mlen, unsigned int rlen); int ksocknal_accept(lnet_ni_t *ni, struct socket *sock); -extern int ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ip, int port); -extern ksock_peer_t *ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id); -extern ksock_peer_t *ksocknal_find_peer(lnet_ni_t *ni, lnet_process_id_t id); -extern void ksocknal_peer_failed(ksock_peer_t *peer); -extern int ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, -struct socket *sock, int type); -extern void ksocknal_close_conn_locked(ksock_conn_t *conn, int why); -extern void ksocknal_terminate_conn(ksock_conn_t *conn); -extern void ksocknal_destroy_conn(ksock_conn_t *conn); -extern int ksocknal_close_peer_conns_locked(ksock_peer_t *peer, - __u32 ipaddr, int why); -extern int ksocknal_close_conn_and_siblings(ksock_conn_t *conn, int why); -extern int ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr); -extern ksock_conn_t *ksocknal_find_conn_locked(ksock_peer_t *peer, - ksock_tx_t *tx, int nonblk); - -extern int ksocknal_launch_packet(lnet_ni_t *ni, ksock_tx_t *tx, - lnet_process_id_t id); -extern ksock_tx_t *ksocknal_alloc_tx(int type, int size); -extern void ksocknal_free_tx(ksock_tx_t *tx); -extern ksock_tx_t *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk); -extern void ksocknal_next_tx_carrier(ksock_conn_t *conn); -extern void ksocknal_queue_tx_locked(ksock_tx_t *tx, ksock_con
[PATCH 13/19] staging: rtl8188eu: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/rtl8188eu/include/osdep_service.h | 2 +- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 8 drivers/staging/rtl8188eu/include/sta_info.h | 18 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 00472e0..cf9ca68 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -123,7 +123,7 @@ static inline int rtw_netif_queue_stopped(struct net_device *pnetdev) #define BIT35 0x08 #define BIT36 0x10 -extern int RTW_STATUS_CODE(int error_code); +int RTW_STATUS_CODE(int error_code); #define rtw_update_mem_stat(flag, sz) do {} while (0) u8 *_rtw_malloc(u32 sz); diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h index 2417809..9093a5f 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h @@ -457,9 +457,9 @@ struct mlme_ext_priv { int init_mlme_ext_priv(struct adapter *adapter); int init_hw_mlme_ext(struct adapter *padapter); void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext); -extern void init_mlme_ext_timer(struct adapter *padapter); -extern void init_addba_retry_timer(struct adapter *adapt, struct sta_info *sta); -extern struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv); +void init_mlme_ext_timer(struct adapter *padapter); +void init_addba_retry_timer(struct adapter *adapt, struct sta_info *sta); +struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv); unsigned char networktype_to_raid(unsigned char network_type); u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int len); @@ -554,7 +554,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *addr, int cam_idx); void beacon_timing_control(struct adapter *padapter); -extern u8 set_tx_beacon_cmd(struct adapter *padapter); +u8 set_tx_beacon_cmd(struct adapter *padapter); unsigned int setup_beacon_frame(struct adapter *padapter, unsigned char *beacon_frame); void update_mgnt_tx_rate(struct adapter *padapter, u8 rate); diff --git a/drivers/staging/rtl8188eu/include/sta_info.h b/drivers/staging/rtl8188eu/include/sta_info.h index 7bbeedf..d4e7832 100644 --- a/drivers/staging/rtl8188eu/include/sta_info.h +++ b/drivers/staging/rtl8188eu/include/sta_info.h @@ -350,19 +350,19 @@ static inline u32 wifi_mac_hash(u8 *mac) return x; } -extern u32 _rtw_init_sta_priv(struct sta_priv *pstapriv); -extern u32 _rtw_free_sta_priv(struct sta_priv *pstapriv); +u32 _rtw_init_sta_priv(struct sta_priv *pstapriv); +u32 _rtw_free_sta_priv(struct sta_priv *pstapriv); #define stainfo_offset_valid(offset) (offset < NUM_STA && offset >= 0) int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta); struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int off); -extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr); -extern u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta); -extern void rtw_free_all_stainfo(struct adapter *adapt); -extern struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr); -extern u32 rtw_init_bcmc_stainfo(struct adapter *adapt); -extern struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter); -extern u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr); +struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr); +u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta); +void rtw_free_all_stainfo(struct adapter *adapt); +struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr); +u32 rtw_init_bcmc_stainfo(struct adapter *adapt); +struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter); +u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr); #endif /* _STA_INFO_H_ */ -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/19] staging: nvec: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- drivers/staging/nvec/nvec.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/nvec/nvec.h b/drivers/staging/nvec/nvec.h index e271375..2ec9de9 100644 --- a/drivers/staging/nvec/nvec.h +++ b/drivers/staging/nvec/nvec.h @@ -165,19 +165,18 @@ struct nvec_chip { int state; }; -extern int nvec_write_async(struct nvec_chip *nvec, const unsigned char *data, -short size); +int nvec_write_async(struct nvec_chip *nvec, const unsigned char *data, +short size); -extern struct nvec_msg *nvec_write_sync(struct nvec_chip *nvec, - const unsigned char *data, short size); +struct nvec_msg *nvec_write_sync(struct nvec_chip *nvec, +const unsigned char *data, short size); -extern int nvec_register_notifier(struct nvec_chip *nvec, - struct notifier_block *nb, - unsigned int events); +int nvec_register_notifier(struct nvec_chip *nvec, + struct notifier_block *nb, + unsigned int events); -extern int nvec_unregister_notifier(struct nvec_chip *dev, - struct notifier_block *nb); +int nvec_unregister_notifier(struct nvec_chip *dev, struct notifier_block *nb); -extern void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg); +void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg); #endif -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/19] staging: fbtft: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- drivers/staging/fbtft/fbtft.h | 52 +-- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h index ab4a658..7e9a506 100644 --- a/drivers/staging/fbtft/fbtft.h +++ b/drivers/staging/fbtft/fbtft.h @@ -262,40 +262,38 @@ struct fbtft_par { par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__) /* fbtft-core.c */ -extern void fbtft_dbg_hex(const struct device *dev, - int groupsize, void *buf, size_t len, const char *fmt, ...); +void fbtft_dbg_hex(const struct device *dev, int groupsize, + void *buf, size_t len, const char *fmt, ...); struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, struct device *dev, struct fbtft_platform_data *pdata); -extern void fbtft_framebuffer_release(struct fb_info *info); -extern int fbtft_register_framebuffer(struct fb_info *fb_info); -extern int fbtft_unregister_framebuffer(struct fb_info *fb_info); -extern void fbtft_register_backlight(struct fbtft_par *par); -extern void fbtft_unregister_backlight(struct fbtft_par *par); -extern int fbtft_init_display(struct fbtft_par *par); -extern int fbtft_probe_common(struct fbtft_display *display, - struct spi_device *sdev, struct platform_device *pdev); -extern int fbtft_remove_common(struct device *dev, struct fb_info *info); +void fbtft_framebuffer_release(struct fb_info *info); +int fbtft_register_framebuffer(struct fb_info *fb_info); +int fbtft_unregister_framebuffer(struct fb_info *fb_info); +void fbtft_register_backlight(struct fbtft_par *par); +void fbtft_unregister_backlight(struct fbtft_par *par); +int fbtft_init_display(struct fbtft_par *par); +int fbtft_probe_common(struct fbtft_display *display, struct spi_device *sdev, + struct platform_device *pdev); +int fbtft_remove_common(struct device *dev, struct fb_info *info); /* fbtft-io.c */ -extern int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len); -extern int fbtft_write_spi_emulate_9(struct fbtft_par *par, - void *buf, size_t len); -extern int fbtft_read_spi(struct fbtft_par *par, void *buf, size_t len); -extern int fbtft_write_gpio8_wr(struct fbtft_par *par, void *buf, size_t len); -extern int fbtft_write_gpio16_wr(struct fbtft_par *par, void *buf, size_t len); -extern int fbtft_write_gpio16_wr_latched(struct fbtft_par *par, - void *buf, size_t len); +int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len); +int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len); +int fbtft_read_spi(struct fbtft_par *par, void *buf, size_t len); +int fbtft_write_gpio8_wr(struct fbtft_par *par, void *buf, size_t len); +int fbtft_write_gpio16_wr(struct fbtft_par *par, void *buf, size_t len); +int fbtft_write_gpio16_wr_latched(struct fbtft_par *par, void *buf, size_t len); /* fbtft-bus.c */ -extern int fbtft_write_vmem8_bus8(struct fbtft_par *par, size_t offset, size_t len); -extern int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len); -extern int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len); -extern int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len); -extern void fbtft_write_reg8_bus8(struct fbtft_par *par, int len, ...); -extern void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...); -extern void fbtft_write_reg16_bus8(struct fbtft_par *par, int len, ...); -extern void fbtft_write_reg16_bus16(struct fbtft_par *par, int len, ...); +int fbtft_write_vmem8_bus8(struct fbtft_par *par, size_t offset, size_t len); +int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len); +int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len); +int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len); +void fbtft_write_reg8_bus8(struct fbtft_par *par, int len, ...); +void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...); +void fbtft_write_reg16_bus8(struct fbtft_par *par, int len, ...); +void fbtft_write_reg16_bus16(struct fbtft_par *par, int len, ...); #define FBTFT_REGISTER_DRIVER(_name, _compatible, _display)\ -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/19] staging: octeon: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/octeon/ethernet-mdio.h | 2 +- drivers/staging/octeon/octeon-ethernet.h | 22 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/octeon/ethernet-mdio.h b/drivers/staging/octeon/ethernet-mdio.h index a530b55..5ed8483 100644 --- a/drivers/staging/octeon/ethernet-mdio.h +++ b/drivers/staging/octeon/ethernet-mdio.h @@ -25,7 +25,7 @@ extern const struct ethtool_ops cvm_oct_ethtool_ops; -extern void octeon_mdiobus_force_mod_depencency(void); +void octeon_mdiobus_force_mod_depencency(void); int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); int cvm_oct_phy_setup_device(struct net_device *dev); diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h index e9d3e9a..a242c70 100644 --- a/drivers/staging/octeon/octeon-ethernet.h +++ b/drivers/staging/octeon/octeon-ethernet.h @@ -53,20 +53,20 @@ struct octeon_ethernet { int cvm_oct_free_work(void *work_queue_entry); -extern int cvm_oct_rgmii_init(struct net_device *dev); -extern void cvm_oct_rgmii_uninit(struct net_device *dev); -extern int cvm_oct_rgmii_open(struct net_device *dev); +int cvm_oct_rgmii_init(struct net_device *dev); +void cvm_oct_rgmii_uninit(struct net_device *dev); +int cvm_oct_rgmii_open(struct net_device *dev); -extern int cvm_oct_sgmii_init(struct net_device *dev); -extern int cvm_oct_sgmii_open(struct net_device *dev); +int cvm_oct_sgmii_init(struct net_device *dev); +int cvm_oct_sgmii_open(struct net_device *dev); -extern int cvm_oct_spi_init(struct net_device *dev); -extern void cvm_oct_spi_uninit(struct net_device *dev); -extern int cvm_oct_xaui_init(struct net_device *dev); -extern int cvm_oct_xaui_open(struct net_device *dev); +int cvm_oct_spi_init(struct net_device *dev); +void cvm_oct_spi_uninit(struct net_device *dev); +int cvm_oct_xaui_init(struct net_device *dev); +int cvm_oct_xaui_open(struct net_device *dev); -extern int cvm_oct_common_init(struct net_device *dev); -extern void cvm_oct_common_uninit(struct net_device *dev); +int cvm_oct_common_init(struct net_device *dev); +void cvm_oct_common_uninit(struct net_device *dev); void cvm_oct_adjust_link(struct net_device *dev); int cvm_oct_common_stop(struct net_device *dev); int cvm_oct_common_open(struct net_device *dev, -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/19] staging: rtl8712: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches --- drivers/staging/rtl8712/rtl871x_ioctl.h | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl.h b/drivers/staging/rtl8712/rtl871x_ioctl.h index 8e6ef5d..c9218be 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl.h +++ b/drivers/staging/rtl8712/rtl871x_ioctl.h @@ -76,22 +76,18 @@ uint oid_null_function(struct oid_par_priv *poid_par_priv); extern struct iw_handler_def r871x_handlers_def; -extern uint drv_query_info( - struct net_device *MiniportAdapterContext, - uint Oid, - void *InformationBuffer, - u32 InformationBufferLength, - u32 *BytesWritten, - u32 *BytesNeeded -); +uint drv_query_info(struct net_device *MiniportAdapterContext, + uint Oid, + void *InformationBuffer, + u32 InformationBufferLength, + u32 *BytesWritten, + u32 *BytesNeeded); -extern uint drv_set_info( - struct net_device *MiniportAdapterContext, - uint Oid, - void *InformationBuffer, - u32 InformationBufferLength, - u32 *BytesRead, - u32 *BytesNeeded -); +uint drv_set_info(struct net_device *MiniportAdapterContext, + uint Oid, + void *InformationBuffer, + u32 InformationBufferLength, + u32 *BytesRead, + u32 *BytesNeeded); #endif -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] drivers: staging: unisys: add MODULE_DEVICE_TABLE and temporary MODULE_ALIAS lines to visornic
From: Prarit Bhargava This patch adds an module alias and a MODULE_DEVICE_TABLE to autoload the visornic driver when an appropriate device is created by the visorbus. Note, the correct way of fixing this is adding functionality to scripts/mod/file2alias.c for the visorbus bus type. Signed-off-by: Prarit Bhargava Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visornic/visornic_main.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 63d90f5..8c9da7e 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -71,6 +71,15 @@ static struct visor_channeltype_descriptor visornic_channel_types[] = { { SPAR_VNIC_CHANNEL_PROTOCOL_UUID, "ultravnic" }, { NULL_UUID_LE, NULL } }; +MODULE_DEVICE_TABLE(visorbus, visornic_channel_types); +/* + * FIXME XXX: This next line of code must be fixed and removed before + * acceptance into the 'normal' part of the kernel. It is only here as a place + * holder to get module autoloading functionality working for visorbus. Code + * must be added to scripts/mode/file2alias.c, etc., to get this working + * properly. + */ +MODULE_ALIAS("visorbus:" SPAR_VNIC_CHANNEL_PROTOCOL_UUID_STR); /* This is used to tell the visor bus driver which types of visor devices * we support, and what functions to call when a visor device that we support -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/19] staging: xgifb: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches --- drivers/staging/xgifb/vb_init.h| 4 ++-- drivers/staging/xgifb/vb_setmode.h | 34 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.h b/drivers/staging/xgifb/vb_init.h index 2457302..500cabe 100644 --- a/drivers/staging/xgifb/vb_init.h +++ b/drivers/staging/xgifb/vb_init.h @@ -1,6 +1,6 @@ #ifndef _VBINIT_ #define _VBINIT_ -extern unsigned char XGIInitNew(struct pci_dev *pdev); -extern void XGIRegInit(struct vb_device_info *, unsigned long); +unsigned char XGIInitNew(struct pci_dev *pdev); +void XGIRegInit(struct vb_device_info *, unsigned long); #endif diff --git a/drivers/staging/xgifb/vb_setmode.h b/drivers/staging/xgifb/vb_setmode.h index 5301bec..6f082a7a 100644 --- a/drivers/staging/xgifb/vb_setmode.h +++ b/drivers/staging/xgifb/vb_setmode.h @@ -1,23 +1,23 @@ #ifndef _VBSETMODE_ #define _VBSETMODE_ -extern void InitTo330Pointer(unsigned char, struct vb_device_info *); -extern void XGI_UnLockCRT2(struct vb_device_info *); -extern void XGI_LockCRT2(struct vb_device_info *); -extern void XGI_DisplayOff(struct xgifb_video_info *, - struct xgi_hw_device_info *, - struct vb_device_info *); -extern void XGI_GetVBType(struct vb_device_info *); -extern void XGI_SenseCRT1(struct vb_device_info *); -extern unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, - struct xgi_hw_device_info *HwDeviceExtension, - unsigned short ModeNo); +void InitTo330Pointer(unsigned char, struct vb_device_info *); +void XGI_UnLockCRT2(struct vb_device_info *); +void XGI_LockCRT2(struct vb_device_info *); +void XGI_DisplayOff(struct xgifb_video_info *, + struct xgi_hw_device_info *, + struct vb_device_info *); +void XGI_GetVBType(struct vb_device_info *); +void XGI_SenseCRT1(struct vb_device_info *); +unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, + struct xgi_hw_device_info *HwDeviceExtension, + unsigned short ModeNo); -extern unsigned char XGI_SearchModeID(unsigned short ModeNo, - unsigned short *ModeIdIndex); -extern unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, -unsigned short ModeNo, -unsigned short ModeIdIndex, -struct vb_device_info *); +unsigned char XGI_SearchModeID(unsigned short ModeNo, + unsigned short *ModeIdIndex); +unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, + unsigned short ModeNo, + unsigned short ModeIdIndex, + struct vb_device_info *); #endif -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 11/19] staging: octeon: Remove unnecessary externs
On 08/10/2015 02:51 PM, Joe Perches wrote: Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches Acked-by: David Daney --- drivers/staging/octeon/ethernet-mdio.h | 2 +- drivers/staging/octeon/octeon-ethernet.h | 22 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) [...] ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: wilc1000: wilc_memory.h: remove unused define
Remove unused define macro that is never used. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_memory.h | 51 -- 1 file changed, 51 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_memory.h b/drivers/staging/wilc1000/wilc_memory.h index 372d705..e3be567 100644 --- a/drivers/staging/wilc1000/wilc_memory.h +++ b/drivers/staging/wilc1000/wilc_memory.h @@ -126,20 +126,8 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, (WILC_MemoryAlloc( \ (__size__), __attrs__, NULL, 0)) -/*! - * @brief standrad calloc wrapper with custom attributes - */ - #define WILC_CALLOC_EX(__size__, __attrs__) \ - (WILC_MemoryCalloc( \ -(__size__), __attrs__, NULL, 0)) /*! - * @brief standrad realloc wrapper with custom attributes - */ - #define WILC_REALLOC_EX(__ptr__, __new_size__, __attrs__) \ - (WILC_MemoryRealloc( \ -(__ptr__), (__new_size__), __attrs__, NULL, 0)) -/*! * @brief standrad free wrapper with custom attributes */ #define WILC_FREE_EX(__ptr__, __attrs__) \ @@ -154,24 +142,7 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, ((__struct_type__ *)WILC_MALLOC_EX( \ sizeof(__struct_type__) * (u32)(__n_structs__), __attrs__)) -/*! - * @brief Allocates a block (with custom attributes) of given type and number of - * elements and Zero-fills it - */ -#define WILC_NEW_0_EX(__struct_type__, __n_structs__, __attrs__) \ - ((__struct_type__ *)WILC_CALLOC_EX( \ -sizeof(__struct_type__) * (u32)(__n_structs__), __attrs__)) -/*! - * @brief Frees a block (with custom attributes), also setting the original pointer - * to NULL - */ -#define WILC_FREE_SET_NULL_EX(__ptr__, __attrs__) do { \ - if (__ptr__ != NULL) { \ - WILC_FREE_EX(__ptr__, __attrs__); \ - __ptr__ = NULL; \ - } \ -} while (0) /*! * @brief Frees a block (with custom attributes) if the pointer expression evaluates @@ -189,17 +160,7 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, #define WILC_MALLOC(__size__) \ WILC_MALLOC_EX(__size__, NULL) -/*! - * @brief standrad calloc wrapper with default attributes - */ -#define WILC_CALLOC(__size__) \ - WILC_CALLOC_EX(__size__, NULL) -/*! - * @brief standrad realloc wrapper with default attributes - */ -#define WILC_REALLOC(__ptr__, __new_size__) \ - WILC_REALLOC_EX(__ptr__, __new_size__, NULL) /*! * @brief standrad free wrapper with default attributes @@ -214,19 +175,7 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, #define WILC_NEW(__struct_type__, __n_structs__) \ WILC_NEW_EX(__struct_type__, __n_structs__, NULL) -/*! - * @brief Allocates a block (with default attributes) of given type and number of - * elements and Zero-fills it - */ -#define WILC_NEW_0(__struct_type__, __n_structs__) \ - WILC_NEW_O_EX(__struct_type__, __n_structs__, NULL) -/*! - * @brief Frees a block (with default attributes), also setting the original pointer - * to NULL - */ -#define WILC_FREE_SET_NULL(__ptr__) \ - WILC_FREE_SET_NULL_EX(__ptr__, NULL) /*! * @brief Frees a block (with default attributes) if the pointer expression evaluates -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: wilc1000: remove WILC_FREE
Remove WILC_FREE that is replaced by kfree. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_memory.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_memory.h b/drivers/staging/wilc1000/wilc_memory.h index 1c0cb82..5ec4ef3 100644 --- a/drivers/staging/wilc1000/wilc_memory.h +++ b/drivers/staging/wilc1000/wilc_memory.h @@ -112,11 +112,6 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, -/*! - * @brief standrad free wrapper with default attributes - */ -#define WILC_FREE(__ptr__) \ - WILC_FREE_EX(__ptr__, NULL) /*! * @brief Allocates a block (with default attributes) of given type and number of -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: wilc1000: remove unused memory functions
This patch remove unused memory functions because some macros with this memory function are deleted. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_memory.c | 28 --- drivers/staging/wilc1000/wilc_memory.h | 50 -- 2 files changed, 78 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_memory.c b/drivers/staging/wilc1000/wilc_memory.c index 34ef13e..53ba1d0 100644 --- a/drivers/staging/wilc1000/wilc_memory.c +++ b/drivers/staging/wilc1000/wilc_memory.c @@ -15,35 +15,7 @@ void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, return NULL; } -/*! - * @authorsyounan - * @date 18 Aug 2010 - * @version 1.0 - */ -void *WILC_MemoryCalloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, - char *pcFileName, u32 u32LineNo) -{ - return kcalloc(u32Size, 1, GFP_KERNEL); -} - -/*! - * @authorsyounan - * @date 18 Aug 2010 - * @version 1.0 - */ -void *WILC_MemoryRealloc(void *pvOldBlock, u32 u32NewSize, -tstrWILC_MemoryAttrs *strAttrs, char *pcFileName, u32 u32LineNo) -{ - if (u32NewSize == 0) { - kfree(pvOldBlock); - return NULL; - } else if (pvOldBlock == NULL) { - return kmalloc(u32NewSize, GFP_KERNEL); - } else { - return krealloc(pvOldBlock, u32NewSize, GFP_KERNEL); - } -} /*! * @authorsyounan diff --git a/drivers/staging/wilc1000/wilc_memory.h b/drivers/staging/wilc1000/wilc_memory.h index e3be567..1c0cb82 100644 --- a/drivers/staging/wilc1000/wilc_memory.h +++ b/drivers/staging/wilc1000/wilc_memory.h @@ -47,57 +47,7 @@ typedef struct { void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, char *pcFileName, u32 u32LineNo); -/*! - * @brief Allocates a given size of bytes and zero filling it - * @param[in] u32Size size of memory in bytes to be allocated - * @param[in] strAttrs Optional attributes, NULL for default - * if not NULL, pAllocationPool should point to the pool to use for - * this allocation. if NULL memory will be allocated directly from - * the system - * @param[in] pcFileName file name of the calling code for debugging - * @param[in] u32LineNo line number of the calling code for debugging - * @returnThe new allocated block, NULL if allocation fails - * @note It is recommended to use of of the wrapper macros instead of - * calling this function directly - * @sasttrWILC_MemoryAttrs - * @saWILC_CALLOC - * @saWILC_CALLOC_EX - * @saWILC_NEW_0 - * @saWILC_NEW_0_EX - * @authorsyounan - * @date 16 Aug 2010 - * @version 1.0 - */ -void *WILC_MemoryCalloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs, - char *pcFileName, u32 u32LineNo); -/*! - * @brief Reallocates a given block to a new size - * @param[in] pvOldBlock the old memory block, if NULL then this function - * behaves as a new allocation function - * @param[in] u32NewSize size of the new memory block in bytes, if zero then - * this function behaves as a free function - * @param[in] strAttrs Optional attributes, NULL for default - * if pAllocationPool!=NULL and pvOldBlock==NULL, pAllocationPool - * should point to the pool to use for this allocation. - * if pAllocationPool==NULL and pvOldBlock==NULL memory will be - * allocated directly fromthe system - * if and pvOldBlock!=NULL, pAllocationPool will not be inspected - * and reallocation is done from the same pool as the original block - * @param[in] pcFileName file name of the calling code for debugging - * @param[in] u32LineNo line number of the calling code for debugging - * @returnThe new allocated block, possibly same as pvOldBlock - * @note It is recommended to use of of the wrapper macros instead of - * calling this function directly - * @sasttrWILC_MemoryAttrs - * @saWILC_REALLOC - * @saWILC_REALLOC_EX - * @authorsyounan - * @date 16 Aug 2010 - * @version 1.0 - */ -void *WILC_MemoryRealloc(void *pvOldBlock, u32 u32NewSize, -tstrWILC_MemoryAttrs *strAttrs, char *pcFileName, u32 u32LineNo); /*! * @brief Frees given block -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/4] staging: wilc1000: use kfree instead of WILC_FREE
Use kfree instead of WILC_FREE. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/coreconfigurator.c | 12 +-- drivers/staging/wilc1000/host_interface.c | 112 +++--- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_msgqueue.c | 10 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 36 +++ 5 files changed, 86 insertions(+), 86 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 72ff7d4..9484827 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -891,13 +891,13 @@ s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo) if (pstrNetworkInfo != NULL) { if (pstrNetworkInfo->pu8IEs != NULL) { - WILC_FREE(pstrNetworkInfo->pu8IEs); + kfree(pstrNetworkInfo->pu8IEs); pstrNetworkInfo->pu8IEs = NULL; } else { s32Error = WILC_FAIL; } - WILC_FREE(pstrNetworkInfo); + kfree(pstrNetworkInfo); pstrNetworkInfo = NULL; } else { @@ -976,13 +976,13 @@ s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo) if (pstrConnectRespInfo != NULL) { if (pstrConnectRespInfo->pu8RespIEs != NULL) { - WILC_FREE(pstrConnectRespInfo->pu8RespIEs); + kfree(pstrConnectRespInfo->pu8RespIEs); pstrConnectRespInfo->pu8RespIEs = NULL; } else { s32Error = WILC_FAIL; } - WILC_FREE(pstrConnectRespInfo); + kfree(pstrConnectRespInfo); pstrConnectRespInfo = NULL; } else { @@ -1056,7 +1056,7 @@ s32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults) s32 s32Error = WILC_SUCCESS; if (pstrSurveyResults != NULL) { - WILC_FREE(pstrSurveyResults); + kfree(pstrSurveyResults); } return s32Error; @@ -1959,7 +1959,7 @@ s32 CoreConfiguratorDeInit(void) if (gps8ConfigPacket != NULL) { - WILC_FREE(gps8ConfigPacket); + kfree(gps8ConfigPacket); gps8ConfigPacket = NULL; } diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index cc549c2..bc5ddc8 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -798,7 +798,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) WILC_memcpy(gs8GetIP[idx], strWID.ps8WidVal, IP_ALEN); /*get the value by searching the local copy*/ - WILC_FREE(strWID.ps8WidVal); + kfree(strWID.ps8WidVal); if (memcmp(gs8GetIP[idx], gs8SetIP[idx], IP_ALEN) != 0) host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, gs8SetIP[idx], idx); @@ -862,7 +862,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrH { } - WILC_FREE(mac_buf); + kfree(mac_buf); return s32Error; } @@ -1373,28 +1373,28 @@ static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr) /* Deallocate pstrHostIFscanAttr->u8ChnlListLen which was prevoisuly allocated by the sending thread */ if (pstrHostIFscanAttr->pu8ChnlFreqList != NULL) { - WILC_FREE(pstrHostIFscanAttr->pu8ChnlFreqList); + kfree(pstrHostIFscanAttr->pu8ChnlFreqList); pstrHostIFscanAttr->pu8ChnlFreqList = NULL; } /* Deallocate pstrHostIFscanAttr->pu8IEs which was previously allocated by the sending thread */ if (pstrHostIFscanAttr->pu8IEs != NULL) { - WILC_FREE(pstrHostIFscanAttr->pu8IEs); + kfree(pstrHostIFscanAttr->pu8IEs); pstrHostIFscanAttr->pu8IEs = NULL; } if (pstrHostIFscanAttr->strHiddenNetwork.pstrHiddenNetworkInfo != NULL) { - WILC_FREE(pstrHostIFscanAttr->strHiddenNetwork.pstrHiddenNetworkInfo); + kfree(pstrHostIFscanAttr->strHiddenNetwork.pstrHiddenNetworkInfo); pstrHostIFscanAttr->strHiddenNetwork.pstrHiddenNetworkInfo = NULL; } /* Deallocate pstrHostIFscanAttr->u8ChnlListLen which was prevoisuly allocated by the sending thread */ if (pstrHostIFscanAttr->pu8ChnlFreqList != NULL) { - WILC_FREE(pstrHostIFscanAttr->pu8ChnlFreqList); + kfree(pstrHostIFscanAttr->pu8ChnlFreqList); pstrHostIFscanAttr->pu8ChnlFreqList = NULL; } if (pu8HdnNtwrksWidVal != NULL) - WILC_FREE(pu8HdnNtwrksWidVal); + kfree(pu8HdnNtwrksWidVal); return s32Error; } @@ -199
RE: [PATCH v2] staging: fsl-mc: add DPAA2 overview readme
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Sunday, August 09, 2015 9:25 AM > To: Yoder Stuart-B08248; gre...@linuxfoundation.org; Rivera Jose-B46482; katz > Itai-RM05202 > Cc: de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org; a...@arndb.de > Subject: Re: [PATCH v2] staging: fsl-mc: add DPAA2 overview readme > > > > On 07.08.15 03:09, Stuart Yoder wrote: > > add README file providing an overview of the DPAA2 architecture > > and how it is integrated in Linux > > > > Signed-off-by: Stuart Yoder > > --- > > -v2: added changelog text > > > > drivers/staging/fsl-mc/README.txt | 364 > > ++ > > drivers/staging/fsl-mc/TODO | 4 - > > 2 files changed, 364 insertions(+), 4 deletions(-) > > create mode 100644 drivers/staging/fsl-mc/README.txt > > > > diff --git a/drivers/staging/fsl-mc/README.txt > > b/drivers/staging/fsl-mc/README.txt > > new file mode 100644 > > index 000..8214102 > > --- /dev/null > > +++ b/drivers/staging/fsl-mc/README.txt > > @@ -0,0 +1,364 @@ > > +Copyright (C) 2015 Freescale Semiconductor Inc. > > + > > +DPAA2 (Data Path Acceleration Architecture Gen2) > > + > > + > > +This document provides an overview of the Freescale DPAA2 architecture > > +and how it is integrated into the Linux kernel. > > + > > +Contents summary > > + -DPAA2 overview > > + -Overview of DPAA2 objects > > + -DPAA2 Linux driver architecture overview > > +-bus driver > > +-dprc driver > > +-allocator > > +-dpio driver > > +-Ethernet > > +-mac > > + > > +DPAA2 Overview > > +-- > > + > > +DPAA2 is a hardware architecture designed for high-speeed network > > +packet processing. DPAA2 consists of sophisticated mechanisms for > > +processing Ethernet packets, queue management, buffer management, > > +autonomous L2 switching, virtual Ethernet bridging, and accelerator > > +(e.g. crypto) sharing. > > + > > +A DPAA2 hardware component called the Management Complex (or MC) manages > > the > > +DPAA2 hardware resources. The MC provides an object-based abstraction for > > +software drivers to use the DPAA2 hardware. > > + > > +The MC uses DPAA2 hardware resources such as queues, buffer pools, and > > +network ports to create functional objects/devices such as network > > +interfaces, an L2 switch, or accelerator instances. > > + > > +The MC provides memory-mapped I/O command interfaces (MC portals) > > +which DPAA2 software drivers use to operate on DPAA2 objects: > > + > > + +--+ > > + | OS | > > + |DPAA2 drivers | > > + | || > > + +-|+ > > + | > > + | (create,discover,connect > > + | config,use,destroy) > > + | > > + DPAA2 | > > + +| mc portal |-+ > > + | || > > + | +- - - - - - - - - - - - -V- - -+ | > > + | | | | > > + | | Management Complex (MC) | | > > + | | | | > > + | +- - - - - - - - - - - - - - - -+ | > > + | | > > + | Hardware Hardware | > > + | Resources Objects| > > + | - ---| > > + | -queues -DPRC | > > + | -buffer pools -DPMCP | > > + | -Eth MACs/ports -DPIO | > > + | -network interface-DPNI | > > + | profiles -DPMAC | > > + | -queue portals-DPBP | > > + | -MC portals... | > > + | ... | > > + | | > > + +--+ > > + > > +The MC mediates operations such as create, discover, > > +connect, configuration, and destroy. Fast-path operations > > +on data, such as packet transmit/receive, are not mediated by > > +the MC and are done directly using memory mapped regions in > > +DPIO objects. > > + > > +Overview of DPAA2 Objects > > +- > > +The section provides a brief overview of some key objects > > +in the DPAA2 hardware. A simple scenario is described illustrating > > +the objects involved in creating a network interfaces. > > + > > +-DPRC (Datapath Resource Container) > > + > > +A DPRC is an container object that holds all the other > > +types of DPAA2 o
[PATCH] Staging: android: ion: Fix missing a blank line coding style issue.
This is a patch to the ion.c that fixes a warning that tells missing a blank line after declaration Signed-off-by: Junsu Shin --- drivers/staging/android/ion/ion.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 6f48112..e44f5e6 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -1106,6 +1106,7 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client, struct ion_buffer *buffer; struct dma_buf *dmabuf; bool valid_handle; + DEFINE_DMA_BUF_EXPORT_INFO(exp_info); mutex_lock(&client->lock); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: lustre: llite: Added a new line after declaration
On Mon, Aug 10, 2015 at 08:56:02PM +0530, Aparna Karuthodi wrote: > Added a new line to fix a coding style error no space after > declaration detected by checkpatch. > > Signed-off-by: Aparna Karuthodi > --- Why are you sending this patch again? You have sent this one long back and has already been merged by: 06d0c4989fa4 ("staging: lustre: llite: Fix No space after the declaration") regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: android: ion: Fix missing a blank line coding style issue.
On Mon, Aug 10, 2015 at 11:42:27PM -0500, Junsu Shin wrote: > This is a patch to the ion.c that fixes a warning that tells missing a blank > line after declaration > > Signed-off-by: Junsu Shin > --- 1) This is a false positive. 2) You need to refresh your tree. This has already been fixed. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [staging:staging-testing 597/643] drivers/video/fbdev/sm712fb.c:1549:12: warning: 'smtcfb_pci_suspend' defined but not used
On Sun, Aug 09, 2015 at 08:39:56AM +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > staging-testing > head: b963e7223cb3278dda35a6550a8df08ff2be2ee5 > commit: 1461d66728648540a043ba69ace1081ed5006faf [597/643] staging: sm7xxfb: > merge sm712fb with fbdev > config: ia64-allyesconfig (attached as .config) > reproduce: > wget > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout 1461d66728648540a043ba69ace1081ed5006faf > # save the attached .config to linux build tree > make.cross ARCH=ia64 I am not able to reproduce it in my test system (32bit). Tried many times. Compilation fails with: In file included from drivers/nfc/nxp-nci/firmware.c:27:0: include/linux/unaligned/access_ok.h:7:19: error: redefinition of 'get_unaligned_le16' include/linux/unaligned/le_struct.h:6:19: note: previous definition of 'get_unaligned_le16' was here include/linux/unaligned/access_ok.h:12:19: error: redefinition of 'get_unaligned_le32' include/linux/unaligned/le_struct.h:11:19: note: previous definition of 'get_unaligned_le32' was here include/linux/unaligned/access_ok.h:17:19: error: redefinition of 'get_unaligned_le64' include/linux/unaligned/le_struct.h:16:19: note: previous definition of 'get_unaligned_le64' was here include/linux/unaligned/access_ok.h:22:19: error: redefinition of 'get_unaligned_be16' include/linux/unaligned/be_byteshift.h:40:19: note: previous definition of 'get_unaligned_be16' was here include/linux/unaligned/access_ok.h:27:19: error: redefinition of 'get_unaligned_be32' include/linux/unaligned/be_byteshift.h:45:19: note: previous definition of 'get_unaligned_be32' was here include/linux/unaligned/access_ok.h:32:19: error: redefinition of 'get_unaligned_be64' include/linux/unaligned/be_byteshift.h:50:19: note: previous definition of 'get_unaligned_be64' was here include/linux/unaligned/access_ok.h:37:20: error: redefinition of 'put_unaligned_le16' include/linux/unaligned/le_struct.h:21:20: note: previous definition of 'put_unaligned_le16' was here include/linux/unaligned/access_ok.h:42:20: error: redefinition of 'put_unaligned_le32' include/linux/unaligned/le_struct.h:26:20: note: previous definition of 'put_unaligned_le32' was here include/linux/unaligned/access_ok.h:47:20: error: redefinition of 'put_unaligned_le64' include/linux/unaligned/le_struct.h:31:20: note: previous definition of 'put_unaligned_le64' was here include/linux/unaligned/access_ok.h:52:20: error: redefinition of 'put_unaligned_be16' include/linux/unaligned/be_byteshift.h:55:20: note: previous definition of 'put_unaligned_be16' was here include/linux/unaligned/access_ok.h:57:20: error: redefinition of 'put_unaligned_be32' include/linux/unaligned/be_byteshift.h:60:20: note: previous definition of 'put_unaligned_be32' was here include/linux/unaligned/access_ok.h:62:20: error: redefinition of 'put_unaligned_be64' include/linux/unaligned/be_byteshift.h:65:20: note: previous definition of 'put_unaligned_be64' was here regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel