Re: Getting the ccree driver out of staging
On Thu, Jan 11, 2018 at 08:33:00AM +0200, Gilad Ben-Yossef wrote: > > Herbert, it's up to you - shall I send a new patch set or do you want to just > move what's in the staging tree? Please send a new patch. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Getting the ccree driver out of staging
On Wed, Jan 10, 2018 at 6:39 PM, Greg Kroah-Hartman wrote: > On Wed, Jan 10, 2018 at 08:54:55AM +0200, Gilad Ben-Yossef wrote: >> Hi folks, >> >> With the enormous help of people in the to and CCed lists I've gotten >> the ccree driver to a point I believe it is ready to graduate out of >> the staging tree: >> >> - The code base has been reduced by something by 30% and is *much* >> more readable and manageable. >> - The very few checkpatch warnings are all false positives (one due to >> dt bindings going through the crypto tree, the others due to harmless >> macro argument reuse) >> and the few sparse output are equally benign. >> - The driver follows the crypto API expected behavior as much as I can tell. >> - Fixed all the bugs I could fine as a result of tcrypt tests. >> - It works :-) >> >> There are obviously more things todo, but I believe they are out of >> scope for staging. >> >> So, if you see something that still needs work, kindly let me know. >> Alternatively, will you accept a patch moving it to drivers/crypto/? > > It might make more sense to just send a "new" patch adding the driver to > drivers/crypto/ and if that is accepted, we can drop it from staging. > That way it's easier for the crypto developers to review it. > > But it's up to them, whatever they want is fine with me. Thanks, Greg. Herbert, it's up to you - shall I send a new patch set or do you want to just move what's in the staging tree? Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4 2/2] staging: ccree: fixed sparse pointer signedness warnings.
Hi Jermey, On Wed, Jan 10, 2018 at 3:33 PM, Jeremy Sowden wrote: > This patch fixes sparse warnings arising when the addresses of signed > variables are passed to functions expecting pointers to unsigned > integers by converting those signed variables to unsigned as follows: > > * changed the types of a number of index and length variables from > signed to unsigned integer types. > > * changed the return-types of a couple of functions that return length > values which are assigned to one of these variables from signed to > unsigned integer types. > > Signed-off-by: Jeremy Sowden > --- Please run scripts/checkpatch.pl on patches before submission. They have multiple coding style errors. You should probably also read Documentation/process/submitting-patches.rst Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
答复: 答复: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting
>-邮件原件- >发件人: Laura Abbott [mailto:labb...@redhat.com] >发送时间: 2018年1月11日 8:01 >收件人: Zengtao (B) ; Dan Carpenter >; Chenfeng (puck) >抄送: sumit.sem...@linaro.org; gre...@linuxfoundation.org; >a...@android.com; tk...@android.com; m...@android.com; >de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org >主题: Re: 答复: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask >setting > >On 01/09/2018 04:06 AM, Zengtao (B) wrote: >>> -邮件原件- >>> 发件人: Dan Carpenter [mailto:dan.carpen...@oracle.com] >>> 发送时间: 2018年1月9日 17:14 >>> 收件人: Chenfeng (puck) >>> 抄送: Zengtao (B) ; labb...@redhat.com; >>> sumit.sem...@linaro.org; gre...@linuxfoundation.org; >>> a...@android.com; tk...@android.com; m...@android.com; >>> de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org >>> 主题: Re: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask >>> setting >>> >>> On Tue, Jan 09, 2018 at 11:30:09AM +0800, Chen Feng wrote: On 2018/1/9 18:43, Zeng Tao wrote: > This issue is introduced by the commit ("ION: Sys_heap: > Add cached pool to spead up cached buffer alloc"), >>> >>> Use the Fixes tag. >>> >>> Fixes: e7f63771b60e ("ION: Sys_heap: Add cached pool to spead up >>> cached buffer alloc") >>> >> Agree, thanks. >> > >If you're going to be fixing this, it would be good to fix the other problems >pointed out (stop with the #define of the flags). > It is OK, I will fix in the new version fix. And to make the code more explicit, I have to choices of fixes: Choice 1: if (orders[i] > 4) gfp_flags = high_order_gfp_flags; else gfp_flags = low_order_gfp_flags; Choice 2: gfp_flags = (orders[i] > 4) ? high_order_gfp_flags : low_order_gfp_flags; Any suggestion ? BTW, I found another problem related: Currently the order 4 and order 0 allocation flag haven't got the __GFP_NOWARN set, if the order 4 allocation failed but the allocation of order 0 success, it will print warning message which is useless. Of course, this is not related to this fix, but this is what I have met when test this fix. Thanks Zengtao ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] tools: hv: fix compiler warnings about major/target_fname
This patch fixes the below warnings with new glibc and gcc: hv_vss_daemon.c:100:13: warning: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly. hv_fcopy_daemon.c:42:2: note: 'snprintf' output between 2 and 1040 bytes into a destination of size 260 Signed-off-by: Dexuan Cui Cc: Stephen Hemminger Cc: K. Y. Srinivasan --- tools/hv/hv_fcopy_daemon.c | 3 ++- tools/hv/hv_vss_daemon.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c index 457a152..785f4e9 100644 --- a/tools/hv/hv_fcopy_daemon.c +++ b/tools/hv/hv_fcopy_daemon.c @@ -23,13 +23,14 @@ #include #include #include +#include #include #include #include #include static int target_fd; -static char target_fname[W_MAX_PATH]; +static char target_fname[PATH_MAX]; static unsigned long long filesize; static int hv_start_fcopy(struct hv_start_fcopy *smsg) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index b2b4ebf..34031a2 100644 --- a/tools/hv/hv_vss_daemon.c +++ b/tools/hv/hv_vss_daemon.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 0/2] staging: rtl8723bs: Fix multiple trailing semicolons
On Wed, 2018-01-10 at 17:01 +, Luis de Bethencourt wrote: > On 01/10/2018 04:51 PM, Luis de Bethencourt wrote: > > Hi, > > > > Removing the last patch from the original series after Dan's comment. > > > > Tomorrow, I will send a new patch that removes the commented out code. This > > will > > replace that last patch. > > > > Thanks for the review, > > Luis > > > > > > Luis de Bethencourt (2): > > staging: rtl8723bs: Fix trailing semicolon > > staging: rtl8723bs: Fix trailing semicolon > > > > drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2 +- > > drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > A little bit too late but I just realized that instead of LKML (which is > down), > I can link to the archives of the driverdev mailing list instead. > > Here is Dan's email which I reference above: > http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115392.html > > Thanks, > Luis If you really want to remove these, perhaps do it treewide. $ git grep -P -n ";\s*;\s*$" -- "*.[ch]"|grep -vw for|grep -vP ":\s+;\s*;\s*$" arch/arc/kernel/setup.c:376:char *opt_nm = NULL;; arch/arc/kernel/unwind.c:369: panic("Attention !!! Dwarf FDE parsing errors\n");; arch/arm/include/asm/kvm_emulate.h:134: return cpsr_mode > USR_MODE;; arch/arm/kernel/time.c:86:static clock_access_fn __read_boot_clock = dummy_clock_access;; arch/arm64/kernel/ptrace.c:1422:int err, idx = compat_ptrace_hbp_num_to_idx(num);; arch/mips/include/asm/checksum.h:113: u32 sum = (__force u32)csum;; arch/powerpc/kvm/book3s_xive.c:160: return -ENOMEM;; arch/powerpc/platforms/powernv/pci-ioda.c:1843: return -ENODEV;; arch/x86/boot/compressed/eboot.c:442: u32 *handles = (u32 *)uga_handle;; arch/x86/boot/compressed/eboot.c:487: u64 *handles = (u64 *)uga_handle;; block/sed-opal.c:493: return -EOPNOTSUPP;; drivers/clocksource/mips-gic-timer.c:208: return -EINVAL;; drivers/clocksource/mips-gic-timer.c:213: return -EINVAL;; drivers/clocksource/timer-sun5i.c:337: return PTR_ERR(timer_base);; drivers/dax/device.c:136: return NULL;; drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c:721: union lane_status dpcd_lane_status[LANE_COUNT_DP_MAX] = {{{0}}};; drivers/gpu/drm/amd/powerplay/amd_powerplay.c:165: return -EINVAL;; drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:683:aspace = NULL;; drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:645: block = (size >> page[i].shift) << page[i].shift;; drivers/gpu/drm/scheduler/gpu_scheduler.c:464: int i;; drivers/hwmon/lm75.c:103: break;; drivers/iommu/intel-svm.c:196: unsigned long mask = __rounddown_pow_of_two(address ^ last);; drivers/md/dm-thin.c:1725: struct dm_thin_endio_hook *h = dm_per_bio_data(bio, sizeof(struct dm_thin_endio_hook));; drivers/md/raid1.c::r1_bio->behind_master_bio = behind_bio;; drivers/net/can/rx-offload.c:259: return can_rx_offload_init_queue(dev, offload, weight);; drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:488: mlx5e_close_channels(&epriv->channels);; drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h:1175: u8 dummy4_1:1;; drivers/pci/pci-driver.c:971: return pm_generic_freeze_late(dev);; drivers/powercap/intel_rapl.c:1212: int nr_pl, ret;; drivers/soc/imx/gpc.c:351: return PTR_ERR(domain->supply);; drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c:1055:regEA4 = PHY_QueryBBReg(pDM_Odm->Adapter, rRx_Power_Before_IQK_A_2, bMaskDWord);; drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:156:tmplong2 = PHY_QueryBBReg(Adapter, rFPGA0_XA_HSSIParameter2|MaskforPhySet, bMaskDWord);; drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:970: ret = -EINVAL;; drivers/target/target_core_user.c:1409: return ret;; include/net/vxlan.h:304:return features;; net/netfilter/nft_dynset.c:167: err = nft_validate_register_load(priv->sreg_key, set->klen);; samples/bpf/xdp_monitor_kern.c:107: u64 *cnt;; scripts/mod/modpost.c:1688: const char *tosec = sec_name(elf, get_secindex(elf, sym));; sound/core/pcm_native.c:3449: struct snd_pcm_runtime *runtime = substream->runtime;; sound/soc/codecs/cs42l73.c:1358:return ret;; tools/perf/util/evlist.c:1763: goto state_err;; tools/testing/selftests/nsfs/pidns.c:73:return pr_err("Don't get EPERM");; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] drivers/fbtft: Fix indentation
On Wed, Jan 10, 2018 at 06:30:35PM +0100, Jonny Schaefer wrote: > From: Luis Gerhorst > > This fixes the checkpatch message: > > CHECK: Alignment should match open parenthesis > #1380: FILE: drivers/staging/fbtft/fbtft-core.c:1380: > + dev_warn(dev, > + "no default functions for regwidth=%d and > buswidth=%d\n", > Perhaps: Checkpatch emits CHECK: Alignment should match open parenthesis Align code to open parenthesis. Reasoning: Patch description should describe the problem then describe what the patch does (in imperative mood). Better advice is given in Documentation/process/submitting-patches.rst section 2 Hope this helps, Tobin. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: 答复: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting
On 01/09/2018 04:06 AM, Zengtao (B) wrote: -邮件原件- 发件人: Dan Carpenter [mailto:dan.carpen...@oracle.com] 发送时间: 2018年1月9日 17:14 收件人: Chenfeng (puck) 抄送: Zengtao (B) ; labb...@redhat.com; sumit.sem...@linaro.org; gre...@linuxfoundation.org; a...@android.com; tk...@android.com; m...@android.com; de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org 主题: Re: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting On Tue, Jan 09, 2018 at 11:30:09AM +0800, Chen Feng wrote: On 2018/1/9 18:43, Zeng Tao wrote: This issue is introduced by the commit ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc"), Use the Fixes tag. Fixes: e7f63771b60e ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc") Agree, thanks. If you're going to be fixing this, it would be good to fix the other problems pointed out (stop with the #define of the flags). Thanks, Laura ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 and prior stable kernels)
From: Long Li The original patch was made for stable 4.1 and was Acked on 08/22/2017, but for some reason it never made it to the stable tree. Change from v1: Changed comment that this patch is for linux-stable 4.1 and all prior stable kernels. storvsc checks the SG list for gaps before passing them to Hyper-v device. If there are gaps, data is copied to a bounce buffer and a continuous data buffer is passed to Hyper-V. The check on gaps assumes SG list is continuous, and not chained. This is not always true. Failing the check may result in incorrect I/O data passed to the Hyper-v device. This code path is not used post Linux 4.1. Signed-off-by: Long Li Acked-by: Martin K. Petersen --- drivers/scsi/storvsc_drv.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 6c52d14..14dc5c6 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -584,17 +584,18 @@ static int do_bounce_buffer(struct scatterlist *sgl, unsigned int sg_count) for (i = 0; i < sg_count; i++) { if (i == 0) { /* make sure 1st one does not have hole */ - if (sgl[i].offset + sgl[i].length != PAGE_SIZE) + if (sgl->offset + sgl->length != PAGE_SIZE) return i; } else if (i == sg_count - 1) { /* make sure last one does not have hole */ - if (sgl[i].offset != 0) + if (sgl->offset != 0) return i; } else { /* make sure no hole in the middle */ - if (sgl[i].length != PAGE_SIZE || sgl[i].offset != 0) + if (sgl->length != PAGE_SIZE || sgl->offset != 0) return i; } + sgl = sg_next(sgl); } return -1; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 5/9] staging: wilc1000: removed few unnecessary enums typedef
On Wed, Jan 10, 2018 at 04:42:47PM +0530, Ajay Singh wrote: > This patch removes following N_OPERATING_MODE_T,N_OBSS_DETECTION_T, > N_PROTECTION_TYPE_T,N_SMPS_MODE_T,TX_ABORT_OPTION_T, typedef enum. > Now, these enums are used as anonymous-enums for constants. > > checkpatch.pl warning to not add new typedef is fixes with this patch. > > Signed-off-by: Ajay Singh > --- > drivers/staging/wilc1000/wilc_wlan_if.h | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) This is the same subject line as the previous patch in the series, yet they are doing different things. Please take this series and work on the subject lines to make them a bit more unique and different from each other, and resend. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: suspicious RCU usage at drivers/staging/android/ion/ion-ioctl.c:LINE
On 01/10/2018 03:18 AM, syzbot wrote: Hello, syzkaller hit the following crash on 69eed2290e1d81b7a33774a24bbcb79f51958e57 git://git.cmpxchg.org/linux-mmots.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached. Unfortunately, I don't have any reproducer for this bug yet. IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+1df9728298a8617bd...@syzkaller.appspotmail.com It will help syzbot understand when the bug is fixed. See footer for details. If you forward the report, please keep this part and the footer. = WARNING: suspicious RCU usage 4.15.0-rc6-mm1+ #52 Not tainted WARNING: CPU: 1 PID: 4388 at drivers/staging/android/ion/ion-ioctl.c:63 ion_ioctl+0x2db/0x380 drivers/staging/android/ion/ion-ioctl.c:63 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 4388 Comm: syz-executor1 Not tainted 4.15.0-rc6-mm1+ #52 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 panic+0x1e4/0x41c kernel/panic.c:183 __warn+0x1dc/0x200 kernel/panic.c:547 report_bug+0x211/0x2d0 lib/bug.c:184 fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178 fixup_bug arch/x86/kernel/traps.c:247 [inline] do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315 invalid_op+0x22/0x40 arch/x86/entry/entry_64.S:1079 RIP: 0010:ion_ioctl+0x2db/0x380 drivers/staging/android/ion/ion-ioctl.c:63 RSP: 0018:8801cf60fce0 EFLAGS: 00010212 RAX: 0001 RBX: 0018 RCX: 841563eb RDX: 006f RSI: c90002d23000 RDI: 8801cf60fd14 RBP: 8801cf60fd78 R08: d7987b3bb57b3c72 R09: ed0039ec1fa5 R10: 0003 R11: ed0039ec1fa4 R12: 110039ec1f9e R13: c0184908 R14: 8801cf60fd50 R15: dc00 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x23/0x9a RIP: 0033:0x452ac9 RSP: 002b:7fd877792c58 EFLAGS: 0212 ORIG_RAX: 0010 RAX: ffda RBX: 0071bea0 RCX: 00452ac9 RDX: 20003000 RSI: c0184908 RDI: 0013 RBP: 03aa R08: R09: R10: R11: 0212 R12: 006f3890 R13: R14: 7fd8777936d4 R15: Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Rebooting in 86400 seconds.. #syz dup: WARNING in ion_ioctl ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: WARNING in ion_buffer_destroy
On 01/09/2018 02:58 PM, syzbot wrote: Hello, syzkaller hit the following crash on 06d41862286aa7bc634a1dd9e6e7e96f925ef30a git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached. C reproducer is attached syzkaller reproducer is attached. See https://goo.gl/kgGztJ for information about syzkaller reproducers IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+cd8bcd40cb049efa2...@syzkaller.appspotmail.com It will help syzbot understand when the bug is fixed. See footer for details. If you forward the report, please keep this part and the footer. audit: type=1400 audit(1515538424.230:7): avc: denied { map } for pid=3499 comm="syzkaller239906" path="/root/syzkaller239906633" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 WARNING: CPU: 0 PID: 1467 at drivers/staging/android/ion/ion.c:122 ion_buffer_destroy+0xd4/0x190 drivers/staging/android/ion/ion.c:122 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 1467 Comm: ion_system_heap Not tainted 4.15.0-rc7-next-20180109+ #92 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 panic+0x1e4/0x41c kernel/panic.c:183 __warn+0x1dc/0x200 kernel/panic.c:547 report_bug+0x211/0x2d0 lib/bug.c:184 fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178 fixup_bug arch/x86/kernel/traps.c:247 [inline] do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315 invalid_op+0x22/0x40 arch/x86/entry/entry_64.S:1079 RIP: 0010:ion_buffer_destroy+0xd4/0x190 drivers/staging/android/ion/ion.c:122 RSP: 0018:8801d3a9fd28 EFLAGS: 00010293 RAX: 8801d39ee700 RBX: 8801c00e57c0 RCX: 8415d2a4 RDX: RSI: 0001 RDI: 8801d5ada5b8 RBP: 8801d3a9fd50 R08: R09: 11003a753f8a R10: 8801d3a9fc18 R11: R12: 86e4c980 R13: 8801d5ada580 R14: 8801c00e57e0 R15: 0001 ion_heap_deferred_free+0x290/0x650 drivers/staging/android/ion/ion_heap.c:236 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:524 Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Rebooting in 86400 seconds.. This is catching that a buffer was freed with an existing kernel map still present. The problem is this can easily be triggered from userspace by calling DMA_BUF_SYNC_START without calling DMA_BUF_SYNC_END. It's clearly not appropriate for userspace to be able to trigger a warning so I'll see about switching this to a pr_warn_once. Thanks, Laura ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] drivers/fbtft: Fix indentation
From: Luis Gerhorst This fixes the checkpatch message: CHECK: Alignment should match open parenthesis #1380: FILE: drivers/staging/fbtft/fbtft-core.c:1380: + dev_warn(dev, + "no default functions for regwidth=%d and buswidth=%d\n", Signed-off-by: Luis Gerhorst Signed-off-by: Jonny Schaefer Acked-by: Alexander Wuerstlein --- Changes since v1: - Add patch description --- drivers/staging/fbtft/fbtft-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 34b1c81..566f89c 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -1377,8 +1377,8 @@ int fbtft_probe_common(struct fbtft_display *display, par->fbtftops.write_register = fbtft_write_reg16_bus16; else dev_warn(dev, - "no default functions for regwidth=%d and buswidth=%d\n", - display->regwidth, display->buswidth); +"no default functions for regwidth=%d and buswidth=%d\n", +display->regwidth, display->buswidth); /* write_vmem() functions */ if (display->buswidth == 8) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] uio_hv_generic: fix type mismatch warnings
On Wed, Jan 10, 2018 at 5:57 PM, Stephen Hemminger wrote: > On Wed, 10 Jan 2018 17:42:38 +0100 > Arnd Bergmann wrote: > >> I moved the virt_to_phys() conversion into hv_uio_probe() as part of >> a warning fix. Stephen's cleanup to remove the private mmap() function >> seems reasonable, but part of it reverted the change that I did to >> hide the warnings, so they are back now: >> >> drivers/uio/uio_hv_generic.c: In function 'hv_uio_probe': >> drivers/uio/uio_hv_generic.c:123:5: error: cast from pointer to integer of >> different size [-Werror=pointer-to-int-cast] >> drivers/uio/uio_hv_generic.c:130:5: error: cast from pointer to integer of >> different size [-Werror=pointer-to-int-cast] >> drivers/uio/uio_hv_generic.c:136:5: error: cast from pointer to integer of >> different size [-Werror=pointer-to-int-cast] >> >> The type mismatch is now the result of the uio_mmap() definition, and >> the best way I see from here is to shut them up with a uintptr_t cast. >> >> Fixes: 9c40546c012c ("uio_hv_generic: use standard mmap for resources") >> Signed-off-by: Arnd Bergmann > > Thanks. Not sure why I don't see these. > > Signed-off-by: Stephen Hemminger This is only on 32-bit targets with 64-bit phys_addr_t, which you don't normally have on x86 in regular configurations, but it can happen in randconfig builds. Arnd ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 0/2] staging: rtl8723bs: Fix multiple trailing semicolons
On 01/10/2018 04:51 PM, Luis de Bethencourt wrote: > Hi, > > Removing the last patch from the original series after Dan's comment. > > Tomorrow, I will send a new patch that removes the commented out code. This > will > replace that last patch. > > Thanks for the review, > Luis > > > Luis de Bethencourt (2): > staging: rtl8723bs: Fix trailing semicolon > staging: rtl8723bs: Fix trailing semicolon > > drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2 +- > drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > A little bit too late but I just realized that instead of LKML (which is down), I can link to the archives of the driverdev mailing list instead. Here is Dan's email which I reference above: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115392.html Thanks, Luis ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] uio_hv_generic: fix type mismatch warnings
On Wed, 10 Jan 2018 17:42:38 +0100 Arnd Bergmann wrote: > I moved the virt_to_phys() conversion into hv_uio_probe() as part of > a warning fix. Stephen's cleanup to remove the private mmap() function > seems reasonable, but part of it reverted the change that I did to > hide the warnings, so they are back now: > > drivers/uio/uio_hv_generic.c: In function 'hv_uio_probe': > drivers/uio/uio_hv_generic.c:123:5: error: cast from pointer to integer of > different size [-Werror=pointer-to-int-cast] > drivers/uio/uio_hv_generic.c:130:5: error: cast from pointer to integer of > different size [-Werror=pointer-to-int-cast] > drivers/uio/uio_hv_generic.c:136:5: error: cast from pointer to integer of > different size [-Werror=pointer-to-int-cast] > > The type mismatch is now the result of the uio_mmap() definition, and > the best way I see from here is to shut them up with a uintptr_t cast. > > Fixes: 9c40546c012c ("uio_hv_generic: use standard mmap for resources") > Signed-off-by: Arnd Bergmann Thanks. Not sure why I don't see these. Signed-off-by: Stephen Hemminger ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 0/2] staging: rtl8723bs: Fix multiple trailing semicolons
Hi, Removing the last patch from the original series after Dan's comment. Tomorrow, I will send a new patch that removes the commented out code. This will replace that last patch. Thanks for the review, Luis Luis de Bethencourt (2): staging: rtl8723bs: Fix trailing semicolon staging: rtl8723bs: Fix trailing semicolon drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/2] staging: rtl8723bs: Fix trailing semicolon
The trailing semicolon is an empty statement that does nothing. Removing it since it has no purpose. Signed-off-by: Luis de Bethencourt --- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c index 21ec890fd60c..e34d133075c0 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c @@ -153,7 +153,7 @@ static u32 phy_RFSerialRead_8723B( NewOffset = Offset; if (eRFPath == RF_PATH_A) { - tmplong2 = PHY_QueryBBReg(Adapter, rFPGA0_XA_HSSIParameter2|MaskforPhySet, bMaskDWord);; + tmplong2 = PHY_QueryBBReg(Adapter, rFPGA0_XA_HSSIParameter2|MaskforPhySet, bMaskDWord); tmplong2 = (tmplong2 & (~bLSSIReadAddress)) | (NewOffset<<23) | bLSSIReadEdge; /* T65 RF */ PHY_SetBBReg(Adapter, rFPGA0_XA_HSSIParameter2|MaskforPhySet, bMaskDWord, tmplong2&(~bLSSIReadEdge)); } else { -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/2] staging: rtl8723bs: Fix trailing semicolon
The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt --- drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c index c16e147d8adc..a99a863be656 100644 --- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c @@ -1052,7 +1052,7 @@ static u8 phy_PathB_RxIQK8723B(struct adapter *padapter, bool configPathB) /* Check failed */ regEAC = PHY_QueryBBReg(pDM_Odm->Adapter, rRx_Power_After_IQK_A_2, bMaskDWord); - regEA4 = PHY_QueryBBReg(pDM_Odm->Adapter, rRx_Power_Before_IQK_A_2, bMaskDWord);; + regEA4 = PHY_QueryBBReg(pDM_Odm->Adapter, rRx_Power_Before_IQK_A_2, bMaskDWord); ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("0xeac = 0x%x\n", regEAC)); ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("0xea4 = 0x%x, 0xeac = 0x%x\n", regEA4, regEAC)); -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 6/6] uio_hv_generic: support sub-channels
On Tue, Jan 09, 2018 at 12:57:33PM -0800, Stephen Hemminger wrote: > Use sysfs to allow supporting sub-channels. The userspace application > makes request to host to create sub-channels and the UIO kernel > driver populates the sysfs per-channel directory with a binary > attribute file that can be used to read/write ring. > > Signed-off-by: Stephen Hemminger > --- > Documentation/driver-api/uio-howto.rst | 5 ++ > drivers/uio/uio_hv_generic.c | 95 > -- > 2 files changed, 97 insertions(+), 3 deletions(-) > > diff --git a/Documentation/driver-api/uio-howto.rst > b/Documentation/driver-api/uio-howto.rst > index 693e3bd84e79..7d36a50c0484 100644 > --- a/Documentation/driver-api/uio-howto.rst > +++ b/Documentation/driver-api/uio-howto.rst > @@ -709,6 +709,11 @@ The vmbus device regions are mapped into uio device > resources: > 3) Network receive buffer region > 4) Network send buffer region > > +If a subchannel is created by a request to host, then the uio_hv_generic > +device driver will create a sysfs binary file for the per-channel ring > buffer. > +For example: > + > /sys/bus/vmbus/devices/3811fe4d-0fa0-4b62-981a-74fc1084c757/channels/21/ring_buffer > + > Further information > === > No Documentation/ABI/ update for this new sysfs file? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] uio_hv_generic: fix type mismatch warnings
I moved the virt_to_phys() conversion into hv_uio_probe() as part of a warning fix. Stephen's cleanup to remove the private mmap() function seems reasonable, but part of it reverted the change that I did to hide the warnings, so they are back now: drivers/uio/uio_hv_generic.c: In function 'hv_uio_probe': drivers/uio/uio_hv_generic.c:123:5: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] drivers/uio/uio_hv_generic.c:130:5: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] drivers/uio/uio_hv_generic.c:136:5: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] The type mismatch is now the result of the uio_mmap() definition, and the best way I see from here is to shut them up with a uintptr_t cast. Fixes: 9c40546c012c ("uio_hv_generic: use standard mmap for resources") Signed-off-by: Arnd Bergmann --- drivers/uio/uio_hv_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index a0c4c07a907f..c740984506f7 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -120,20 +120,20 @@ hv_uio_probe(struct hv_device *dev, /* mem resources */ pdata->info.mem[TXRX_RING_MAP].name = "txrx_rings"; pdata->info.mem[TXRX_RING_MAP].addr - = (phys_addr_t)dev->channel->ringbuffer_pages; + = (uintptr_t)dev->channel->ringbuffer_pages; pdata->info.mem[TXRX_RING_MAP].size = dev->channel->ringbuffer_pagecount << PAGE_SHIFT; pdata->info.mem[TXRX_RING_MAP].memtype = UIO_MEM_LOGICAL; pdata->info.mem[INT_PAGE_MAP].name = "int_page"; pdata->info.mem[INT_PAGE_MAP].addr - = (phys_addr_t)vmbus_connection.int_page; + = (uintptr_t)vmbus_connection.int_page; pdata->info.mem[INT_PAGE_MAP].size = PAGE_SIZE; pdata->info.mem[INT_PAGE_MAP].memtype = UIO_MEM_LOGICAL; pdata->info.mem[MON_PAGE_MAP].name = "monitor_page"; pdata->info.mem[MON_PAGE_MAP].addr - = (phys_addr_t)vmbus_connection.monitor_pages[1]; + = (uintptr_t)vmbus_connection.monitor_pages[1]; pdata->info.mem[MON_PAGE_MAP].size = PAGE_SIZE; pdata->info.mem[MON_PAGE_MAP].memtype = UIO_MEM_LOGICAL; -- 2.9.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Getting the ccree driver out of staging
On Wed, Jan 10, 2018 at 08:54:55AM +0200, Gilad Ben-Yossef wrote: > Hi folks, > > With the enormous help of people in the to and CCed lists I've gotten > the ccree driver to a point I believe it is ready to graduate out of > the staging tree: > > - The code base has been reduced by something by 30% and is *much* > more readable and manageable. > - The very few checkpatch warnings are all false positives (one due to > dt bindings going through the crypto tree, the others due to harmless > macro argument reuse) > and the few sparse output are equally benign. > - The driver follows the crypto API expected behavior as much as I can tell. > - Fixed all the bugs I could fine as a result of tcrypt tests. > - It works :-) > > There are obviously more things todo, but I believe they are out of > scope for staging. > > So, if you see something that still needs work, kindly let me know. > Alternatively, will you accept a patch moving it to drivers/crypto/? It might make more sense to just send a "new" patch adding the driver to drivers/crypto/ and if that is accepted, we can drop it from staging. That way it's easier for the crypto developers to review it. But it's up to them, whatever they want is fine with me. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/3] staging: rtl8723bs: Fix trailing semicolon in comment
On Wed, Jan 10, 2018 at 01:50:38PM +, Luis de Bethencourt wrote: > Even though the code is commented out, it has a small bug. The trailing > semicolon is an empty statement that does no operation. Removing it since > it doesn't do anything. It's not a bug because it's totally harmless to add extra semicolons. But it's better to just delete all the commented out lines. I don't really want to see a bunch of patches to code which should just be deleted. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/3] staging: rtl8723bs: Fix multiple trailing semicolons
Hi, This is a follow-up of yesterday's water-testing patch [0]. Just 3 more similar cases of trailing semicolons. Sending them separately to atomize the changes, but happy to merge them all into one. It is easier to first try separate and later merge if people want me to. In patch 3/3, not sure why this file has so many lines of commented out code. Maybe I should remove the commented out code instead. pcur_network is clearly not being used. What do you all think? Over the weekend I will start running a mainline kernel on my CHIP, and looking at this driver in more depth. Fun! Thanks, Luis [0] Sorry I don't have a link, LKML is down Luis de Bethencourt (3): staging: rtl8723bs: Fix trailing semicolon staging: rtl8723bs: Fix trailing semicolon staging: rtl8723bs: Fix trailing semicolon in comment drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: rtl8723bs: Fix trailing semicolon
The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt --- drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c index c16e147d8adc..a99a863be656 100644 --- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c @@ -1052,7 +1052,7 @@ static u8 phy_PathB_RxIQK8723B(struct adapter *padapter, bool configPathB) /* Check failed */ regEAC = PHY_QueryBBReg(pDM_Odm->Adapter, rRx_Power_After_IQK_A_2, bMaskDWord); - regEA4 = PHY_QueryBBReg(pDM_Odm->Adapter, rRx_Power_Before_IQK_A_2, bMaskDWord);; + regEA4 = PHY_QueryBBReg(pDM_Odm->Adapter, rRx_Power_Before_IQK_A_2, bMaskDWord); ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("0xeac = 0x%x\n", regEAC)); ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("0xea4 = 0x%x, 0xeac = 0x%x\n", regEA4, regEAC)); -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: rtl8723bs: Fix trailing semicolon in comment
Even though the code is commented out, it has a small bug. The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt --- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index fe739eb2cf7d..7d1f19b2960d 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -2889,7 +2889,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe struct ht_priv *phtpriv = &pmlmepriv->htpriv; /* struct recv_priv *precvpriv = &padapter->recvpriv; */ struct registry_priv *pregistrypriv = &padapter->registrypriv; - /* struct wlan_network *pcur_network = &(pmlmepriv->cur_network);; */ + /* struct wlan_network *pcur_network = &(pmlmepriv->cur_network); */ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u8 cbw40_enable = 0; -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: rtl8723bs: Fix trailing semicolon
The trailing semicolon is an empty statement that does nothing. Removing it since it has no purpose. Signed-off-by: Luis de Bethencourt --- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c index 21ec890fd60c..e34d133075c0 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c @@ -153,7 +153,7 @@ static u32 phy_RFSerialRead_8723B( NewOffset = Offset; if (eRFPath == RF_PATH_A) { - tmplong2 = PHY_QueryBBReg(Adapter, rFPGA0_XA_HSSIParameter2|MaskforPhySet, bMaskDWord);; + tmplong2 = PHY_QueryBBReg(Adapter, rFPGA0_XA_HSSIParameter2|MaskforPhySet, bMaskDWord); tmplong2 = (tmplong2 & (~bLSSIReadAddress)) | (NewOffset<<23) | bLSSIReadEdge; /* T65 RF */ PHY_SetBBReg(Adapter, rFPGA0_XA_HSSIParameter2|MaskforPhySet, bMaskDWord, tmplong2&(~bLSSIReadEdge)); } else { -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 2/2] staging: ccree: fixed sparse pointer signedness warnings.
This patch fixes sparse warnings arising when the addresses of signed variables are passed to functions expecting pointers to unsigned integers by converting those signed variables to unsigned as follows: * changed the types of a number of index and length variables from signed to unsigned integer types. * changed the return-types of a couple of functions that return length values which are assigned to one of these variables from signed to unsigned integer types. Signed-off-by: Jeremy Sowden --- drivers/staging/ccree/cc_aead.c | 15 +-- drivers/staging/ccree/cc_buffer_mgr.c | 2 +- drivers/staging/ccree/cc_cipher.c | 3 ++- drivers/staging/ccree/cc_hash.c | 17 + 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ccree/cc_aead.c b/drivers/staging/ccree/cc_aead.c index c29a509041e8..5a71e014e13c 100644 --- a/drivers/staging/ccree/cc_aead.c +++ b/drivers/staging/ccree/cc_aead.c @@ -257,9 +257,10 @@ static void cc_aead_complete(struct device *dev, void *cc_req, int err) aead_request_complete(areq, err); } -static int xcbc_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) +static unsigned int xcbc_setkey(struct cc_hw_desc *desc, +struct cc_aead_ctx *ctx) { - int idx = 0; + unsigned int idx = 0; /* Load the AES key */ hw_desc_init(&desc[idx]); @@ -303,7 +304,8 @@ static int xcbc_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) return idx; } -static int hmac_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) +static unsigned int hmac_setkey(struct cc_hw_desc *desc, +struct cc_aead_ctx *ctx) { unsigned int hmac_pad_const[2] = { HMAC_IPAD_CONST, HMAC_OPAD_CONST }; unsigned int digest_ofs = 0; @@ -313,7 +315,7 @@ static int hmac_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) CC_SHA1_DIGEST_SIZE : CC_SHA256_DIGEST_SIZE; struct cc_hmac_s *hmac = &ctx->auth_state.hmac; - int idx = 0; + unsigned int idx = 0; int i; /* calc derived HMAC key */ @@ -550,7 +552,8 @@ cc_aead_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) struct cc_crypto_req cc_req = {}; struct crypto_authenc_key_param *param; struct cc_hw_desc desc[MAX_AEAD_SETKEY_SEQ]; - int seq_len = 0, rc = -EINVAL; + unsigned int seq_len = 0; + int rc = -EINVAL; struct device *dev = drvdata_to_dev(ctx->drvdata); dev_dbg(dev, "Setting key in context @%p for %s. key=%p keylen=%u\n", @@ -1889,7 +1892,7 @@ static int cc_proc_aead(struct aead_request *req, enum drv_crypto_direction direct) { int rc = 0; - int seq_len = 0; + unsigned int seq_len = 0; struct cc_hw_desc desc[MAX_AEAD_PROCESS_SEQ]; struct crypto_aead *tfm = crypto_aead_reqtfm(req); struct cc_aead_ctx *ctx = crypto_aead_ctx(tfm); diff --git a/drivers/staging/ccree/cc_buffer_mgr.c b/drivers/staging/ccree/cc_buffer_mgr.c index 14b2eabbf70a..6dbc9b4d6eb8 100644 --- a/drivers/staging/ccree/cc_buffer_mgr.c +++ b/drivers/staging/ccree/cc_buffer_mgr.c @@ -1018,7 +1018,7 @@ static int cc_aead_chain_data(struct cc_drvdata *drvdata, struct device *dev = drvdata_to_dev(drvdata); enum drv_crypto_direction direct = areq_ctx->gen_ctx.op_type; unsigned int authsize = areq_ctx->req_authsize; - int src_last_bytes = 0, dst_last_bytes = 0; + u32 src_last_bytes = 0, dst_last_bytes = 0; int rc = 0; u32 src_mapped_nents = 0, dst_mapped_nents = 0; u32 offset = 0; diff --git a/drivers/staging/ccree/cc_cipher.c b/drivers/staging/ccree/cc_cipher.c index 8afdbc120b13..56a8064e7519 100644 --- a/drivers/staging/ccree/cc_cipher.c +++ b/drivers/staging/ccree/cc_cipher.c @@ -633,7 +633,8 @@ static int cc_cipher_process(struct ablkcipher_request *req, struct device *dev = drvdata_to_dev(ctx_p->drvdata); struct cc_hw_desc desc[MAX_ABLKCIPHER_SEQ_LEN]; struct cc_crypto_req cc_req = {}; - int rc, seq_len = 0, cts_restore_flag = 0; + int rc, cts_restore_flag = 0; + unsigned int seq_len = 0; gfp_t flags = cc_gfp_flags(&req->base); dev_dbg(dev, "%s req=%p info=%p nbytes=%d\n", diff --git a/drivers/staging/ccree/cc_hash.c b/drivers/staging/ccree/cc_hash.c index 86f9ec711edc..24692e079abc 100644 --- a/drivers/staging/ccree/cc_hash.c +++ b/drivers/staging/ccree/cc_hash.c @@ -410,7 +410,7 @@ static int cc_hash_digest(struct ahash_request *req) struct cc_hw_desc desc[CC_MAX_HASH_SEQ_LEN]; cc_sram_addr_t larval_digest_addr = cc_larval_digest_addr(ctx->drvdata, ctx->hash_mode); - int idx = 0; + unsigned int idx = 0; int rc = 0; gfp_t flags = cc_gfp_flags(&req->base); @@ -506,7 +506,7 @@ static int cc_hash_
[PATCH v4 0/2] staging: ccree: fixed sparse pointer signedness warnings.
The driver uses a mixture of signed and unsigned integer variables for holding arrays lengths and indices, which gives rise to sparse warnings when the addresses of signed variables are passed to functions expecting pointers to unsigned integers. This patch-set fixes those warnings by converting those signed variables to unsigned. In v4: * Split the removal of the hard-coded index values into a separate patch. In v3: * removed hard-coded index values. * more detailed change-log. * fixed formatting. In v2: * more detailed change-log. Jeremy Sowden (2): staging: ccree: removed some hard-coded array indices. staging: ccree: fixed sparse pointer signedness warnings. drivers/staging/ccree/cc_aead.c | 61 --- drivers/staging/ccree/cc_buffer_mgr.c | 2 +- drivers/staging/ccree/cc_cipher.c | 3 +- drivers/staging/ccree/cc_hash.c | 17 +- 4 files changed, 47 insertions(+), 36 deletions(-) base-commit: 47595e32869fbd3a68f15dd885865bf34dc435be -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 1/2] staging: ccree: removed some hard-coded array indices.
Replaced hard-coded indices used during initialization of array elements with a variable which is incremented once initialization of each element is complete. Signed-off-by: Jeremy Sowden --- drivers/staging/ccree/cc_aead.c | 48 +++-- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/drivers/staging/ccree/cc_aead.c b/drivers/staging/ccree/cc_aead.c index 265adffdab41..c29a509041e8 100644 --- a/drivers/staging/ccree/cc_aead.c +++ b/drivers/staging/ccree/cc_aead.c @@ -259,42 +259,48 @@ static void cc_aead_complete(struct device *dev, void *cc_req, int err) static int xcbc_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) { + int idx = 0; + /* Load the AES key */ - hw_desc_init(&desc[0]); + hw_desc_init(&desc[idx]); /* We are using for the source/user key the same buffer * as for the output keys, * because after this key loading it * is not needed anymore */ - set_din_type(&desc[0], DMA_DLLI, + set_din_type(&desc[idx], DMA_DLLI, ctx->auth_state.xcbc.xcbc_keys_dma_addr, ctx->auth_keylen, NS_BIT); - set_cipher_mode(&desc[0], DRV_CIPHER_ECB); - set_cipher_config0(&desc[0], DRV_CRYPTO_DIRECTION_ENCRYPT); - set_key_size_aes(&desc[0], ctx->auth_keylen); - set_flow_mode(&desc[0], S_DIN_to_AES); - set_setup_mode(&desc[0], SETUP_LOAD_KEY0); - - hw_desc_init(&desc[1]); - set_din_const(&desc[1], 0x01010101, CC_AES_128_BIT_KEY_SIZE); - set_flow_mode(&desc[1], DIN_AES_DOUT); - set_dout_dlli(&desc[1], ctx->auth_state.xcbc.xcbc_keys_dma_addr, + set_cipher_mode(&desc[idx], DRV_CIPHER_ECB); + set_cipher_config0(&desc[idx], DRV_CRYPTO_DIRECTION_ENCRYPT); + set_key_size_aes(&desc[idx], ctx->auth_keylen); + set_flow_mode(&desc[idx], S_DIN_to_AES); + set_setup_mode(&desc[idx], SETUP_LOAD_KEY0); + idx++; + + hw_desc_init(&desc[idx]); + set_din_const(&desc[idx], 0x01010101, CC_AES_128_BIT_KEY_SIZE); + set_flow_mode(&desc[idx], DIN_AES_DOUT); + set_dout_dlli(&desc[idx], ctx->auth_state.xcbc.xcbc_keys_dma_addr, AES_KEYSIZE_128, NS_BIT, 0); + idx++; - hw_desc_init(&desc[2]); - set_din_const(&desc[2], 0x02020202, CC_AES_128_BIT_KEY_SIZE); - set_flow_mode(&desc[2], DIN_AES_DOUT); - set_dout_dlli(&desc[2], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + hw_desc_init(&desc[idx]); + set_din_const(&desc[idx], 0x02020202, CC_AES_128_BIT_KEY_SIZE); + set_flow_mode(&desc[idx], DIN_AES_DOUT); + set_dout_dlli(&desc[idx], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + AES_KEYSIZE_128), AES_KEYSIZE_128, NS_BIT, 0); + idx++; - hw_desc_init(&desc[3]); - set_din_const(&desc[3], 0x03030303, CC_AES_128_BIT_KEY_SIZE); - set_flow_mode(&desc[3], DIN_AES_DOUT); - set_dout_dlli(&desc[3], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + hw_desc_init(&desc[idx]); + set_din_const(&desc[idx], 0x03030303, CC_AES_128_BIT_KEY_SIZE); + set_flow_mode(&desc[idx], DIN_AES_DOUT); + set_dout_dlli(&desc[idx], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + 2 * AES_KEYSIZE_128), AES_KEYSIZE_128, NS_BIT, 0); + idx++; - return 4; + return idx; } static int hmac_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) base-commit: 47595e32869fbd3a68f15dd885865bf34dc435be -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: ccree: fixed sparse pointer signedness warnings.
On Wed, Jan 10, 2018 at 3:08 PM, Jeremy Sowden wrote: > On 2018-01-10, at 15:03:01 +0200, Gilad Ben-Yossef wrote: >> On Wed, Jan 10, 2018 at 1:53 PM, Jeremy Sowden wrote: >> > The driver uses a mixture of signed and unsigned integer variables >> > for holding arrays lengths and indices, which gives rise to sparse >> > warnings when the addresses of signed variables are passed to >> > functions expecting >> >> Just curious, I didn't see these warning when running sparse myself. >> Can you share the command line/flags you've used? > > make C=2 CF=-Wsparse-all M=drivers/staging/ccree 2>&1 > Thanks, I was missing the -Wsparse-all flag. Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: ccree: fixed sparse pointer signedness warnings.
On 2018-01-10, at 15:03:01 +0200, Gilad Ben-Yossef wrote: > On Wed, Jan 10, 2018 at 1:53 PM, Jeremy Sowden wrote: > > The driver uses a mixture of signed and unsigned integer variables > > for holding arrays lengths and indices, which gives rise to sparse > > warnings when the addresses of signed variables are passed to > > functions expecting > > Just curious, I didn't see these warning when running sparse myself. > Can you share the command line/flags you've used? make C=2 CF=-Wsparse-all M=drivers/staging/ccree 2>&1 Output attached. > > pointers to unsigned integers. This patch fixes those warnings by > > converting those signed variables to unsigned as follows: > > > > * removed some hard-coded array indices. > > Removing the hard coded array indices is a separate and different > issue and so needs to be dealt it in a separate patch. Please split > your patch into a patchset: one for removing the hard coded values and > one for the signed/unsigned remedy. Will do. J. [azazel@ulthar:/space/azazel/work/linux/staging] $ git checkout staging-next Switched to branch 'staging-next' Your branch is up to date with 'origin/staging-next'. [azazel@ulthar:/space/azazel/work/linux/staging] $ make C=2 CF=-Wsparse-all M=drivers/staging/ccree 2>&1 CHECK drivers/staging/ccree/cc_driver.c CHECK drivers/staging/ccree/cc_buffer_mgr.c drivers/staging/ccree/cc_buffer_mgr.c:1050:46: warning: incorrect type in argument 4 (different signedness) drivers/staging/ccree/cc_buffer_mgr.c:1050:46:expected unsigned int [usertype] *lbytes drivers/staging/ccree/cc_buffer_mgr.c:1050:46:got int * drivers/staging/ccree/cc_buffer_mgr.c:1083:62: warning: incorrect type in argument 7 (different signedness) drivers/staging/ccree/cc_buffer_mgr.c:1083:62:expected unsigned int [usertype] *lbytes drivers/staging/ccree/cc_buffer_mgr.c:1083:62:got int * drivers/staging/ccree/cc_buffer_mgr.c:1092:46: warning: incorrect type in argument 4 (different signedness) drivers/staging/ccree/cc_buffer_mgr.c:1092:46:expected unsigned int [usertype] *lbytes drivers/staging/ccree/cc_buffer_mgr.c:1092:46:got int * drivers/staging/ccree/cc_buffer_mgr.c:1120:49: warning: incorrect type in argument 4 (different signedness) drivers/staging/ccree/cc_buffer_mgr.c:1120:49:expected unsigned int [usertype] *src_last_bytes drivers/staging/ccree/cc_buffer_mgr.c:1120:49:got int * drivers/staging/ccree/cc_buffer_mgr.c:1121:49: warning: incorrect type in argument 5 (different signedness) drivers/staging/ccree/cc_buffer_mgr.c:1121:49:expected unsigned int [usertype] *dst_last_bytes drivers/staging/ccree/cc_buffer_mgr.c:1121:49:got int * drivers/staging/ccree/cc_buffer_mgr.c:1124:49: warning: incorrect type in argument 2 (different signedness) drivers/staging/ccree/cc_buffer_mgr.c:1124:49:expected unsigned int [usertype] *src_last_bytes drivers/staging/ccree/cc_buffer_mgr.c:1124:49:got int * drivers/staging/ccree/cc_buffer_mgr.c:1125:44: warning: incorrect type in argument 3 (different signedness) drivers/staging/ccree/cc_buffer_mgr.c:1125:44:expected unsigned int [usertype] *dst_last_bytes drivers/staging/ccree/cc_buffer_mgr.c:1125:44:got int * CC [M] drivers/staging/ccree/cc_buffer_mgr.o CHECK drivers/staging/ccree/cc_request_mgr.c CHECK drivers/staging/ccree/cc_cipher.c drivers/staging/ccree/cc_cipher.c:358:17: warning: Variable length array is used. drivers/staging/ccree/cc_cipher.c:700:67: warning: incorrect type in argument 6 (different signedness) drivers/staging/ccree/cc_cipher.c:700:67:expected unsigned int *seq_size drivers/staging/ccree/cc_cipher.c:700:67:got int * drivers/staging/ccree/cc_cipher.c:703:31: warning: incorrect type in argument 8 (different signedness) drivers/staging/ccree/cc_cipher.c:703:31:expected unsigned int *seq_size drivers/staging/ccree/cc_cipher.c:703:31:got int * CC [M] drivers/staging/ccree/cc_cipher.o CHECK drivers/staging/ccree/cc_hash.c drivers/staging/ccree/cc_hash.c:480:57: warning: incorrect type in argument 6 (different signedness) drivers/staging/ccree/cc_hash.c:480:57:expected unsigned int *seq_size drivers/staging/ccree/cc_hash.c:480:57:got int * drivers/staging/ccree/cc_hash.c:530:57: warning: incorrect type in argument 6 (different signedness) drivers/staging/ccree/cc_hash.c:530:57:expected unsigned int *seq_size drivers/staging/ccree/cc_hash.c:530:57:got int * drivers/staging/ccree/cc_hash.c:1305:43: warning: incorrect type in argument 3 (different signedness) drivers/staging/ccree/cc_hash.c:1305:43:expected unsigned int *seq_size drivers/staging/ccree/cc_hash.c:1305:43:got int * drivers/staging/ccree/cc_hash.c:1307:43: warning: incorrect type in argument 3 (different signedness) drivers/staging/ccree/cc_hash.c:1307:43:expected unsigned int *seq_size drivers/staging/ccree/cc_hash.c:1307:43:got int * drivers/staging/ccree/cc_hash.c:1317:69: warning: incorrect type in argumen
Re: [PATCH v3] staging: ccree: fixed sparse pointer signedness warnings.
Hi Jeremy, On Wed, Jan 10, 2018 at 1:53 PM, Jeremy Sowden wrote: > The driver uses a mixture of signed and unsigned integer variables for > holding arrays lengths and indices, which gives rise to sparse warnings > when the addresses of signed variables are passed to functions expecting Just curious, I didn't see these warning when running sparse myself. Can you share the command line/flags you've used? > pointers to unsigned integers. This patch fixes those warnings by > converting those signed variables to unsigned as follows: > > * removed some hard-coded array indices. Removing the hard coded array indices is a separate and different issue and so needs to be dealt it in a separate patch. Please split your patch into a patchset: one for removing the hard coded values and one for the signed/unsigned remedy. > > * changed the types of a number of index and length variables from > signed to unsigned integer types. > > * changed the return-types of a couple of functions that return length > values which are assigned to one of these variables from signed to > unsigned integer types. > Other that that it looks good to me. Thanks! Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: ccree: fixed sparse pointer signedness warnings.
The driver uses a mixture of signed and unsigned integer variables for holding arrays lengths and indices, which gives rise to sparse warnings when the addresses of signed variables are passed to functions expecting pointers to unsigned integers. This patch fixes those warnings by converting those signed variables to unsigned as follows: * removed some hard-coded array indices. * changed the types of a number of index and length variables from signed to unsigned integer types. * changed the return-types of a couple of functions that return length values which are assigned to one of these variables from signed to unsigned integer types. Signed-off-by: Jeremy Sowden --- drivers/staging/ccree/cc_aead.c | 61 --- drivers/staging/ccree/cc_buffer_mgr.c | 2 +- drivers/staging/ccree/cc_cipher.c | 3 +- drivers/staging/ccree/cc_hash.c | 17 +- 4 files changed, 47 insertions(+), 36 deletions(-) In v3: * removed hard-coded index values. * more detailed change-log. * fixed formatting. In v2: * more detailed change-log. diff --git a/drivers/staging/ccree/cc_aead.c b/drivers/staging/ccree/cc_aead.c index 265adffdab41..5a71e014e13c 100644 --- a/drivers/staging/ccree/cc_aead.c +++ b/drivers/staging/ccree/cc_aead.c @@ -257,47 +257,55 @@ static void cc_aead_complete(struct device *dev, void *cc_req, int err) aead_request_complete(areq, err); } -static int xcbc_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) +static unsigned int xcbc_setkey(struct cc_hw_desc *desc, +struct cc_aead_ctx *ctx) { + unsigned int idx = 0; + /* Load the AES key */ - hw_desc_init(&desc[0]); + hw_desc_init(&desc[idx]); /* We are using for the source/user key the same buffer * as for the output keys, * because after this key loading it * is not needed anymore */ - set_din_type(&desc[0], DMA_DLLI, + set_din_type(&desc[idx], DMA_DLLI, ctx->auth_state.xcbc.xcbc_keys_dma_addr, ctx->auth_keylen, NS_BIT); - set_cipher_mode(&desc[0], DRV_CIPHER_ECB); - set_cipher_config0(&desc[0], DRV_CRYPTO_DIRECTION_ENCRYPT); - set_key_size_aes(&desc[0], ctx->auth_keylen); - set_flow_mode(&desc[0], S_DIN_to_AES); - set_setup_mode(&desc[0], SETUP_LOAD_KEY0); - - hw_desc_init(&desc[1]); - set_din_const(&desc[1], 0x01010101, CC_AES_128_BIT_KEY_SIZE); - set_flow_mode(&desc[1], DIN_AES_DOUT); - set_dout_dlli(&desc[1], ctx->auth_state.xcbc.xcbc_keys_dma_addr, + set_cipher_mode(&desc[idx], DRV_CIPHER_ECB); + set_cipher_config0(&desc[idx], DRV_CRYPTO_DIRECTION_ENCRYPT); + set_key_size_aes(&desc[idx], ctx->auth_keylen); + set_flow_mode(&desc[idx], S_DIN_to_AES); + set_setup_mode(&desc[idx], SETUP_LOAD_KEY0); + idx++; + + hw_desc_init(&desc[idx]); + set_din_const(&desc[idx], 0x01010101, CC_AES_128_BIT_KEY_SIZE); + set_flow_mode(&desc[idx], DIN_AES_DOUT); + set_dout_dlli(&desc[idx], ctx->auth_state.xcbc.xcbc_keys_dma_addr, AES_KEYSIZE_128, NS_BIT, 0); + idx++; - hw_desc_init(&desc[2]); - set_din_const(&desc[2], 0x02020202, CC_AES_128_BIT_KEY_SIZE); - set_flow_mode(&desc[2], DIN_AES_DOUT); - set_dout_dlli(&desc[2], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + hw_desc_init(&desc[idx]); + set_din_const(&desc[idx], 0x02020202, CC_AES_128_BIT_KEY_SIZE); + set_flow_mode(&desc[idx], DIN_AES_DOUT); + set_dout_dlli(&desc[idx], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + AES_KEYSIZE_128), AES_KEYSIZE_128, NS_BIT, 0); + idx++; - hw_desc_init(&desc[3]); - set_din_const(&desc[3], 0x03030303, CC_AES_128_BIT_KEY_SIZE); - set_flow_mode(&desc[3], DIN_AES_DOUT); - set_dout_dlli(&desc[3], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + hw_desc_init(&desc[idx]); + set_din_const(&desc[idx], 0x03030303, CC_AES_128_BIT_KEY_SIZE); + set_flow_mode(&desc[idx], DIN_AES_DOUT); + set_dout_dlli(&desc[idx], (ctx->auth_state.xcbc.xcbc_keys_dma_addr + 2 * AES_KEYSIZE_128), AES_KEYSIZE_128, NS_BIT, 0); + idx++; - return 4; + return idx; } -static int hmac_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) +static unsigned int hmac_setkey(struct cc_hw_desc *desc, +struct cc_aead_ctx *ctx) { unsigned int hmac_pad_const[2] = { HMAC_IPAD_CONST, HMAC_OPAD_CONST }; unsigned int digest_ofs = 0; @@ -307,7 +315,7 @@ static int hmac_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) CC_SHA1_DIGEST_SIZE : CC_SHA256_DIGEST_SIZE; struct cc_hmac_s *hmac = &ctx->auth_state.hmac; -
[PATCH v2 5/9] staging: wilc1000: removed few unnecessary enums typedef
This patch removes following N_OPERATING_MODE_T,N_OBSS_DETECTION_T, N_PROTECTION_TYPE_T,N_SMPS_MODE_T,TX_ABORT_OPTION_T, typedef enum. Now, these enums are used as anonymous-enums for constants. checkpatch.pl warning to not add new typedef is fixes with this patch. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index eec8760..cf4a44d 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -226,40 +226,40 @@ enum { G_RTS_CTS_PROT, }; -typedef enum { +enum { HT_MIXED_MODE = 1, HT_ONLY_20MHZ_MODE, HT_ONLY_20_40MHZ_MODE, -} N_OPERATING_MODE_T; +}; -typedef enum { +enum { NO_DETECT = 0, DETECT_ONLY = 1, DETECT_PROTECT = 2, DETECT_PROTECT_REPORT = 3, -} N_OBSS_DETECTION_T; +}; -typedef enum { +enum { RTS_CTS_NONHT_PROT = 0,/* RTS-CTS at non-HT rate */ FIRST_FRAME_NONHT_PROT, /* First frame at non-HT rate */ LSIG_TXOP_PROT, /* LSIG TXOP Protection */ FIRST_FRAME_MIXED_PROT, /* First frame at Mixed format */ -} N_PROTECTION_TYPE_T; +}; -typedef enum { +enum { STATIC_MODE = 1, DYNAMIC_MODE= 2, MIMO_MODE = 3,/* power save disable */ -} N_SMPS_MODE_T; +}; -typedef enum { +enum { DISABLE_SELF_CTS, ENABLE_SELF_CTS, DISABLE_TX_ABORT, ENABLE_TX_ABORT, HW_TRIGGER_ABORT, SW_TRIGGER_ABORT, -} TX_ABORT_OPTION_T; +}; enum wid_type { WID_CHAR= 0, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 8/9] staging: wilc1000: removed enum typedef BUS_ACQUIRE_T
This patch removes enum typedef BUS_ACQUIRE_T and define enum bus_acquire to use instead of typedef. checkpatch.pl not to add new typedef warning is fixed with this patch. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c| 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 3a58a62..80a5a0b 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -6,7 +6,7 @@ static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP; -static inline void acquire_bus(struct wilc *wilc, BUS_ACQUIRE_T acquire) +static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire) { mutex_lock(&wilc->hif_cs); if (acquire == ACQUIRE_AND_WAKEUP) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 70e3558..65cb53d 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -143,10 +143,10 @@ enum chip_ps_states { CHIP_SLEEPING_MANUAL= 2 }; -typedef enum { +enum bus_acquire { ACQUIRE_ONLY= 0, ACQUIRE_AND_WAKEUP = 1, -} BUS_ACQUIRE_T; +}; typedef enum { RELEASE_ONLY= 0, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 6/9] staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T
This patch removed the unnecessary enum typedef for BEACON_IE & TX_RATE_T It fix "WARNING: do not add new typedefs" reported by checkpatch.pl Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index cf4a44d..068a59d 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -75,7 +75,7 @@ typedef void (*wilc_tx_complete_func_t)(void *, int); #define MAX_SSID_LEN33 #define MAX_RATES_SUPPORTED 12 -typedef enum { +enum { SUPP_RATES_IE = 1, EXT_SUPP_RATES_IE = 50, HT_CAPABILITY_IE= 45, @@ -83,7 +83,7 @@ typedef enum { WPA_IE = 221, WMM_IE = 221, P2P_IE = 221, -} BEACON_IE; +}; enum bss_types { INFRASTRUCTURE = 0, @@ -91,7 +91,7 @@ enum bss_types { AP, }; -typedef enum { +enum { RATE_AUTO = 0, RATE_1MB= 1, RATE_2MB= 2, @@ -105,7 +105,7 @@ typedef enum { RATE_26MB = 36, RATE_48MB = 48, RATE_54MB = 54 -} TX_RATE_T; +}; enum { B_ONLY_MODE = 0,/* 1, 2 M, otherwise 5, 11 M */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 9/9] staging: wilc1000: removed enum typedef BUS_RELEASE_T
This patch removes enum typedef BUS_RELEASE_T and define "enum bus_release" to use instead of typedef. checkpatch.pl not to add new typedef warning is fixed with this patch. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c| 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 80a5a0b..a2b26ec 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -13,7 +13,7 @@ static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire) chip_wakeup(wilc); } -static inline void release_bus(struct wilc *wilc, BUS_RELEASE_T release) +static inline void release_bus(struct wilc *wilc, enum bus_release release) { if (release == RELEASE_ALLOW_SLEEP) chip_allow_sleep(wilc); diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 65cb53d..c1483c8 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -148,10 +148,10 @@ enum bus_acquire { ACQUIRE_AND_WAKEUP = 1, }; -typedef enum { +enum bus_release { RELEASE_ONLY= 0, RELEASE_ALLOW_SLEEP = 1, -} BUS_RELEASE_T; +}; enum { NO_SECURITY = 0, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 7/9] staging: wilc1000: removed enum typedef CHIP_PS_STATE_T
This patch removes enum typedef CHIP_PS_STATE_T and introduce enum chip_ps_states to use instead of typedef. checkpatch.pl not to add new typedef warning is fixed with this patch. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c| 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index f49dfa8..3a58a62 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -4,7 +4,7 @@ #include "wilc_wfi_netdevice.h" #include "wilc_wlan_cfg.h" -static CHIP_PS_STATE_T chip_ps_state = CHIP_WAKEDUP; +static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP; static inline void acquire_bus(struct wilc *wilc, BUS_ACQUIRE_T acquire) { diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 068a59d..70e3558 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -137,11 +137,11 @@ enum { MAX_PSPOLL_PS = 4 }; -typedef enum { +enum chip_ps_states { CHIP_WAKEDUP= 0, CHIP_SLEEPING_AUTO = 1, CHIP_SLEEPING_MANUAL= 2 -} CHIP_PS_STATE_T; +}; typedef enum { ACQUIRE_ONLY= 0, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 0/9] fixes to remove enum typedefs
v2: The patch series is created instead of independent patches & updated the name for Signed-off-by field. This patch series fix "WARNING: do not add new typedefs" issues found by checkpatch.pl Ajay Singh (9): staging: wilc1000: removed typedef from enum BSSTYPE_T staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T staging: wilc1000: removed unnecessary enums typedefs staging: wilc1000: removed few unnecessary enums typedef staging: wilc1000: removed few unnecessary enums typedef staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T staging: wilc1000: removed enum typedef CHIP_PS_STATE_T staging: wilc1000: removed enum typedef BUS_ACQUIRE_T staging: wilc1000: removed enum typedef BUS_RELEASE_T drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 6 +- drivers/staging/wilc1000/wilc_wlan_if.h | 96 +++ 3 files changed, 52 insertions(+), 52 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/9] staging: wilc1000: removed typedef from enum BSSTYPE_T
This patch removes typedef from enum BSSTYPE_T and rename it to bss_types. It fixes "WARNING: do not add new typdefs" warning reported by checkpatch.pl. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d69248a..4ff1a59 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -202,7 +202,7 @@ struct host_if_msg { }; struct join_bss_param { - BSSTYPE_T bss_type; + enum bss_types bss_type; u8 dtim_period; u16 beacon_period; u16 cap_info; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index c1693cf..2baf6c4 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -85,11 +85,11 @@ typedef enum { P2P_IE = 221, } BEACON_IE; -typedef enum { +enum bss_types { INFRASTRUCTURE = 0, INDEPENDENT, AP, -} BSSTYPE_T; +}; typedef enum { RATE_AUTO = 0, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 4/9] staging: wilc1000: removed few unnecessary enums typedef
This patch removes following RSNA_REKEY_POLICY_T,SCAN_CLASS_FITLER_T, SCAN_PRI_T,CH_FILTER_T,N_PROTECTION_MODE_T,G_PROTECTION_MODE_T typedef enum. Now, these enums are used as anonymous-enums for constants. checkpatch.pl warning to avoid new typedef is fixes with this patch. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 598ba9e..eec8760 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -189,42 +189,42 @@ enum { NO_REQUEST = 2, }; -typedef enum { +enum { REKEY_DISABLE = 1, REKEY_TIME_BASE, REKEY_PKT_BASE, REKEY_TIME_PKT_BASE -} RSNA_REKEY_POLICY_T; +}; -typedef enum { +enum { FILTER_NO = 0x00, FILTER_AP_ONLY = 0x01, FILTER_STA_ONLY = 0x02 -} SCAN_CLASS_FITLER_T; +}; -typedef enum { +enum { PRI_HIGH_RSSI = 0x00, PRI_LOW_RSSI= 0x04, PRI_DETECT = 0x08 -} SCAN_PRI_T; +}; -typedef enum { +enum { CH_FILTER_OFF = 0x00, CH_FILTER_ON= 0x10 -} CH_FILTER_T; +}; -typedef enum { +enum { AUTO_PROT = 0,/* Auto */ NO_PROT,/* Do not use any protection */ ERP_PROT, /* Protect all ERP frame exchanges */ HT_PROT,/* Protect all HT frame exchanges */ GF_PROT,/* Protect all GF frame exchanges */ -} N_PROTECTION_MODE_T; +}; -typedef enum { +enum { G_SELF_CTS_PROT, G_RTS_CTS_PROT, -} G_PROTECTION_MODE_T; +}; typedef enum { HT_MIXED_MODE = 1, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/9] staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T
This patch has removed G_OPERATING_MODE_T typedef enum. Now, its used as anonymous-enums for constants. checkpatch.pl warning to avoid new typedef is fixes with this patch. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 2baf6c4..222bde2 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -107,12 +107,12 @@ typedef enum { RATE_54MB = 54 } TX_RATE_T; -typedef enum { +enum { B_ONLY_MODE = 0,/* 1, 2 M, otherwise 5, 11 M */ G_ONLY_MODE,/* 6,12,24 otherwise 9,18,36,48,54 */ G_MIXED_11B_1_MODE, /* 1,2,5.5,11 otherwise all on */ G_MIXED_11B_2_MODE, /* 1,2,5,11,6,12,24 otherwise all on */ -} G_OPERATING_MODE_T; +}; typedef enum { G_SHORT_PREAMBLE= 0,/* Short Preamble */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 3/9] staging: wilc1000: removed unnecessary enums typedefs
This patch removes following G_PREAMBLE_T,SCANTYPE_T, USER_PS_MODE_T,SECURITY_T,ACK_POLICY_T,RESET_REQ_T typedef enum. Now, these enums are used as anonymous-enums for constants. checkpatch.pl warning to avoid new typedef is fixes with this patch. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 222bde2..598ba9e 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -114,28 +114,28 @@ enum { G_MIXED_11B_2_MODE, /* 1,2,5,11,6,12,24 otherwise all on */ }; -typedef enum { +enum { G_SHORT_PREAMBLE= 0,/* Short Preamble */ G_LONG_PREAMBLE = 1,/* Long Preamble */ G_AUTO_PREAMBLE = 2,/* Auto Preamble Selection */ -} G_PREAMBLE_T; +}; #define MAC_CONNECTED 1 #define MAC_DISCONNECTED 0 #define SCAN_DONE TRUE -typedef enum { +enum { PASSIVE_SCAN= 0, ACTIVE_SCAN = 1, -} SCANTYPE_T; +}; -typedef enum { +enum { NO_POWERSAVE= 0, MIN_FAST_PS = 1, MAX_FAST_PS = 2, MIN_PSPOLL_PS = 3, MAX_PSPOLL_PS = 4 -} USER_PS_MODE_T; +}; typedef enum { CHIP_WAKEDUP= 0, @@ -153,7 +153,7 @@ typedef enum { RELEASE_ALLOW_SLEEP = 1, } BUS_RELEASE_T; -typedef enum { +enum { NO_SECURITY = 0, WEP_40 = 0x3, WEP_104 = 0x7, @@ -163,7 +163,7 @@ typedef enum { WPA2_AES= 0x31, WPA2_TKIP = 0x51, WPA2_AES_TKIP = 0x71, /* Aes or Tkip */ -} SECURITY_T; +}; enum AUTHTYPE { OPEN_SYSTEM = 1, @@ -178,16 +178,16 @@ enum SITESURVEY { SITE_SURVEY_OFF = 2 }; -typedef enum { +enum { NORMAL_ACK = 0, NO_ACK, -} ACK_POLICY_T; +}; -typedef enum { +enum { DONT_RESET = 0, DO_RESET= 1, NO_REQUEST = 2, -} RESET_REQ_T; +}; typedef enum { REKEY_DISABLE = 1, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rts5208: sd: fix misspelled constant
Fixes the misspelled constant to 'SWITCH_NO_ERR'. Issue reported by checkpatch.pl Signed-off-by: Sumit Pundir --- drivers/staging/rts5208/sd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/sd.h b/drivers/staging/rts5208/sd.h index 55764e1..900be44 100644 --- a/drivers/staging/rts5208/sd.h +++ b/drivers/staging/rts5208/sd.h @@ -118,7 +118,7 @@ #defineSUPPORT_MAX_POWER_PERMANCE 0x1000 #defineSUPPORT_1V8 0x0100 -#defineSWTICH_NO_ERR 0x00 +#defineSWITCH_NO_ERR 0x00 #defineCARD_NOT_EXIST 0x01 #defineSPEC_NOT_SUPPORT0x02 #defineCHECK_MODE_ERR 0x03 -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: pi433: remove unnecessary parentheses
Joe Perches schrieb am 10.01.2018 10:05: > On Wed, 2018-01-10 at 09:44 +0100, Greg Kroah-Hartman wrote: > > On Tue, Jan 09, 2018 at 11:42:16AM -0800, Joe Perches wrote: > > > if (a == b && c == d) > > > is pretty trivial. > > > > But again, don't do that. > > We disagree. Life goes on. > > cheers, Joe > > For me the line above isn't obvious and easy to read. If I would be in doubt, whether it really performs correctly, I would have to ask the c-guide, to be absolutely shure. But to be honest: If I need to find a bug arround taht lines, I wouldn't ask the c-guide, but simply add some (). Then it would be 100% clear and no one would be in doubt any more. What's the disadvantage of () to emphasise waht is going on. An other Option for me would be, to spend a command line and write that info in form of a comment. Just my opinion and the way, I would go on if I am in doubt and need to find a bug. Cheers, Marcus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: pi433: remove unnecessary parentheses
On Wed, 2018-01-10 at 09:44 +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 09, 2018 at 11:42:16AM -0800, Joe Perches wrote: > > if (a == b && c == d) > > is pretty trivial. > > But again, don't do that. We disagree. Life goes on. cheers, Joe ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: pi433: remove unnecessary parentheses
On Tue, Jan 09, 2018 at 11:42:16AM -0800, Joe Perches wrote: > On Tue, 2018-01-09 at 20:28 +0100, Greg Kroah-Hartman wrote: > > On Tue, Jan 09, 2018 at 11:21:37AM -0800, Joe Perches wrote: > > > On Tue, 2018-01-09 at 15:31 +0100, Greg Kroah-Hartman wrote: > > > > On Mon, Jan 08, 2018 at 06:38:55PM +0100, Valentin Vidic wrote: > > > > > Fixes checkpatch warnings: > > > > > CHECK: Unnecessary parentheses around 'mantisse != mantisse16' > > > > > CHECK: Unnecessary parentheses around 'mantisse != mantisse20' > > > > > CHECK: Unnecessary parentheses around 'mantisse != mantisse24' > > > > > > [] > > > > > diff --git a/drivers/staging/pi433/rf69.c > > > > > b/drivers/staging/pi433/rf69.c > > > > > > [] > > > > > @@ -391,9 +391,9 @@ static int rf69_set_bandwidth_intern(struct > > > > > spi_device *spi, u8 reg, > > > > > return -EINVAL; > > > > > } > > > > > > > > > > - if ((mantisse != mantisse16) && > > > > > - (mantisse != mantisse20) && > > > > > - (mantisse != mantisse24)) { > > > > > + if (mantisse != mantisse16 && > > > > > + mantisse != mantisse20 && > > > > > + mantisse != mantisse24) { > > > > > > > > I'm getting really tired of seeing this checkpatch warning, when it's a > > > > major pain. > > > > > > Your idea of major pain and mine differ a bit. > > > > I don't like taking patches that cause future problems. > > What future problems might this particular case present > that isn't generic in all patches. > > > > > Joe, can you please turn these off. Patches like this will force people > > > > to have to remember that != is higher precidence than &&. > > > > > > As it's not just 1 precedence level but 4 and 5, it > > > really shouldn't be that hard to remember. > > > > I can't remember any of them, and I should not have to. > > That depends on how well you know your C. I have used C for almost ever single day for the past 20+ years, and I sure don't remember the order of these things. But maybe I really don't know my C :) > > That's the > > point, you should not assume anyone knows the levels, code is written > > for developers to understand first, and the compiler second. > > And someone that knows C knows those levels and the parentheses > can just be visual noise requiring extra thought. > > Sometimes it's useful, sometimes it's not. > > if (a == b && c == d) > > is pretty trivial. But again, don't do that. > and I believe > > if ((a == b)) > > emits clang warnings Then remove the extra () there. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel