[kbuild] [drm-intel:drm-intel-next-queued 177/195] drivers/gpu/drm/i915/i915_gpu_error.c:1031 i915_gem_record_rings() error: we previously assumed 'request-ctx' could be null (see line 992)
tree: git://anongit.freedesktop.org/drm-intel drm-intel-next-queued head: c1f7ab8c9a7b09f4ed6499904298ddf1c67b1764 commit: 4ecbdf4dfc537cd9ed53b4cb77e0c48dd6daa620 [177/195] drm/i915/bdw: Make sure error capture keeps working with Execlists drivers/gpu/drm/i915/i915_gpu_error.c:1031 i915_gem_record_rings() error: we previously assumed 'request-ctx' could be null (see line 992) git remote add drm-intel git://anongit.freedesktop.org/drm-intel git remote update drm-intel git checkout 4ecbdf4dfc537cd9ed53b4cb77e0c48dd6daa620 vim +1031 drivers/gpu/drm/i915/i915_gpu_error.c 0ca36d78 Ben Widawsky 2014-06-30 986 i915_record_ring_state(dev, error, ring, error-ring[i]); 84734a04 Mika Kuoppala 2013-07-12 987 ab0e7ff9 Chris Wilson 2014-02-25 988 request = i915_gem_find_active_request(ring); ab0e7ff9 Chris Wilson 2014-02-25 989 if (request) { ae6c4806 Daniel Vetter 2014-08-06 990 struct i915_address_space *vm; ae6c4806 Daniel Vetter 2014-08-06 991 ae6c4806 Daniel Vetter 2014-08-06 @992 vm = request-ctx request-ctx-ppgtt ? ae6c4806 Daniel Vetter 2014-08-06 993 request-ctx-ppgtt-base : ae6c4806 Daniel Vetter 2014-08-06 994 dev_priv-gtt.base; ae6c4806 Daniel Vetter 2014-08-06 995 ab0e7ff9 Chris Wilson 2014-02-25 996 /* We need to copy these to an anonymous buffer ab0e7ff9 Chris Wilson 2014-02-25 997 * as the simplest method to avoid being overwritten ab0e7ff9 Chris Wilson 2014-02-25 998 * by userspace. ab0e7ff9 Chris Wilson 2014-02-25 999 */ 84734a04 Mika Kuoppala 2013-07-12 1000 error-ring[i].batchbuffer = ab0e7ff9 Chris Wilson 2014-02-25 1001 i915_error_object_create(dev_priv, ab0e7ff9 Chris Wilson 2014-02-25 1002 request-batch_obj, ae6c4806 Daniel Vetter 2014-08-06 1003 vm); ab0e7ff9 Chris Wilson 2014-02-25 1004 448caa7d Chris Wilson 2014-08-12 1005 if (HAS_BROKEN_CS_TLB(dev_priv-dev)) ab0e7ff9 Chris Wilson 2014-02-25 1006 error-ring[i].wa_batchbuffer = ab0e7ff9 Chris Wilson 2014-02-25 1007 i915_error_ggtt_object_create(dev_priv, ab0e7ff9 Chris Wilson 2014-02-25 1008 ring-scratch.obj); ab0e7ff9 Chris Wilson 2014-02-25 1009 ab0e7ff9 Chris Wilson 2014-02-25 1010 if (request-file_priv) { ab0e7ff9 Chris Wilson 2014-02-25 1011 struct task_struct *task; ab0e7ff9 Chris Wilson 2014-02-25 1012 ab0e7ff9 Chris Wilson 2014-02-25 1013 rcu_read_lock(); ab0e7ff9 Chris Wilson 2014-02-25 1014 task = pid_task(request-file_priv-file-pid, ab0e7ff9 Chris Wilson 2014-02-25 1015 PIDTYPE_PID); ab0e7ff9 Chris Wilson 2014-02-25 1016 if (task) { ab0e7ff9 Chris Wilson 2014-02-25 1017 strcpy(error-ring[i].comm, task-comm); ab0e7ff9 Chris Wilson 2014-02-25 1018 error-ring[i].pid = task-pid; ab0e7ff9 Chris Wilson 2014-02-25 1019 } ab0e7ff9 Chris Wilson 2014-02-25 1020 rcu_read_unlock(); ab0e7ff9 Chris Wilson 2014-02-25 1021 } ab0e7ff9 Chris Wilson 2014-02-25 1022 } 84734a04 Mika Kuoppala 2013-07-12 1023 4ecbdf4d Oscar Mateo 2014-07-24 1024 if (i915.enable_execlists) { 4ecbdf4d Oscar Mateo 2014-07-24 1025 /* TODO: This is only a small fix to keep basic error 4ecbdf4d Oscar Mateo 2014-07-24 1026 * capture working, but we need to add more information 4ecbdf4d Oscar Mateo 2014-07-24 1027 * for it to be useful (e.g. dump the context being 4ecbdf4d Oscar Mateo 2014-07-24 1028 * executed). 4ecbdf4d Oscar Mateo 2014-07-24 1029 */ 4ecbdf4d Oscar Mateo 2014-07-24 1030 if (request) 4ecbdf4d Oscar Mateo 2014-07-24 @1031 rbuf = request-ctx-engine[ring-id].ringbuf; 4ecbdf4d Oscar Mateo 2014-07-24 1032 else 4ecbdf4d Oscar Mateo 2014-07-24 1033 rbuf = ring-default_context-engine[ring-id].ringbuf; 4ecbdf4d Oscar Mateo 2014-07-24 1034 } else --- 0-DAY kernel build testing backend
[kbuild] [next:master 2131/2422] kernel/sys.c:1888 prctl_set_mm_map() warn: maybe return -EFAULT instead of the bytes remaining?
TO: Cyrill Gorcunov gorcu...@openvz.org CC: Andrew Morton a...@linux-foundation.org CC: Linux Memory Management List linux...@kvack.org tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d05446ae2128064a4bb8f74c84f6901ffb5c94bc commit: 802d335c0f7f1a1867bf59814c55970a71b10413 [2131/2422] prctl: PR_SET_MM -- introduce PR_SET_MM_MAP operation :: branch date: 3 hours ago :: commit date: 32 hours ago kernel/sys.c:1888 prctl_set_mm_map() warn: maybe return -EFAULT instead of the bytes remaining? git remote add next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update next git checkout 802d335c0f7f1a1867bf59814c55970a71b10413 vim +1888 kernel/sys.c 802d335c Cyrill Gorcunov 2014-08-26 1872 802d335c Cyrill Gorcunov 2014-08-26 1873 mm-start_code = prctl_map.start_code; 802d335c Cyrill Gorcunov 2014-08-26 1874 mm-end_code= prctl_map.end_code; 802d335c Cyrill Gorcunov 2014-08-26 1875 mm-start_data = prctl_map.start_data; 802d335c Cyrill Gorcunov 2014-08-26 1876 mm-end_data= prctl_map.end_data; 802d335c Cyrill Gorcunov 2014-08-26 1877 mm-start_brk = prctl_map.start_brk; 802d335c Cyrill Gorcunov 2014-08-26 1878 mm-brk = prctl_map.brk; 802d335c Cyrill Gorcunov 2014-08-26 1879 mm-start_stack = prctl_map.start_stack; 802d335c Cyrill Gorcunov 2014-08-26 1880 mm-arg_start = prctl_map.arg_start; 802d335c Cyrill Gorcunov 2014-08-26 1881 mm-arg_end = prctl_map.arg_end; 802d335c Cyrill Gorcunov 2014-08-26 1882 mm-env_start = prctl_map.env_start; 802d335c Cyrill Gorcunov 2014-08-26 1883 mm-env_end = prctl_map.env_end; 802d335c Cyrill Gorcunov 2014-08-26 1884 802d335c Cyrill Gorcunov 2014-08-26 1885 error = 0; 802d335c Cyrill Gorcunov 2014-08-26 1886 out: 802d335c Cyrill Gorcunov 2014-08-26 1887 up_read(mm-mmap_sem); 802d335c Cyrill Gorcunov 2014-08-26 @1888 return error; 802d335c Cyrill Gorcunov 2014-08-26 1889 } 802d335c Cyrill Gorcunov 2014-08-26 1890 #endif /* CONFIG_CHECKPOINT_RESTORE */ 802d335c Cyrill Gorcunov 2014-08-26 1891 028ee4be Cyrill Gorcunov 2012-01-12 1892 static int prctl_set_mm(int opt, unsigned long addr, 028ee4be Cyrill Gorcunov 2012-01-12 1893 unsigned long arg4, unsigned long arg5) 028ee4be Cyrill Gorcunov 2012-01-12 1894 { 028ee4be Cyrill Gorcunov 2012-01-12 1895 struct mm_struct *mm = current-mm; fe8c7f5c Cyrill Gorcunov 2012-05-31 1896 struct vm_area_struct *vma; --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [next:master 2131/2422] kernel/sys.c:1888 prctl_set_mm_map() warn: maybe return -EFAULT instead of the bytes remaining?
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d05446ae2128064a4bb8f74c84f6901ffb5c94bc commit: 802d335c0f7f1a1867bf59814c55970a71b10413 [2131/2422] prctl: PR_SET_MM -- introduce PR_SET_MM_MAP operation kernel/sys.c:1888 prctl_set_mm_map() warn: maybe return -EFAULT instead of the bytes remaining? git remote add next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update next git checkout 802d335c0f7f1a1867bf59814c55970a71b10413 vim +1888 kernel/sys.c 802d335c Cyrill Gorcunov 2014-08-26 1872 802d335c Cyrill Gorcunov 2014-08-26 1873 mm-start_code = prctl_map.start_code; 802d335c Cyrill Gorcunov 2014-08-26 1874 mm-end_code= prctl_map.end_code; 802d335c Cyrill Gorcunov 2014-08-26 1875 mm-start_data = prctl_map.start_data; 802d335c Cyrill Gorcunov 2014-08-26 1876 mm-end_data= prctl_map.end_data; 802d335c Cyrill Gorcunov 2014-08-26 1877 mm-start_brk = prctl_map.start_brk; 802d335c Cyrill Gorcunov 2014-08-26 1878 mm-brk = prctl_map.brk; 802d335c Cyrill Gorcunov 2014-08-26 1879 mm-start_stack = prctl_map.start_stack; 802d335c Cyrill Gorcunov 2014-08-26 1880 mm-arg_start = prctl_map.arg_start; 802d335c Cyrill Gorcunov 2014-08-26 1881 mm-arg_end = prctl_map.arg_end; 802d335c Cyrill Gorcunov 2014-08-26 1882 mm-env_start = prctl_map.env_start; 802d335c Cyrill Gorcunov 2014-08-26 1883 mm-env_end = prctl_map.env_end; 802d335c Cyrill Gorcunov 2014-08-26 1884 802d335c Cyrill Gorcunov 2014-08-26 1885 error = 0; 802d335c Cyrill Gorcunov 2014-08-26 1886 out: 802d335c Cyrill Gorcunov 2014-08-26 1887 up_read(mm-mmap_sem); 802d335c Cyrill Gorcunov 2014-08-26 @1888 return error; 802d335c Cyrill Gorcunov 2014-08-26 1889 } 802d335c Cyrill Gorcunov 2014-08-26 1890 #endif /* CONFIG_CHECKPOINT_RESTORE */ 802d335c Cyrill Gorcunov 2014-08-26 1891 028ee4be Cyrill Gorcunov 2012-01-12 1892 static int prctl_set_mm(int opt, unsigned long addr, 028ee4be Cyrill Gorcunov 2012-01-12 1893 unsigned long arg4, unsigned long arg5) 028ee4be Cyrill Gorcunov 2012-01-12 1894 { 028ee4be Cyrill Gorcunov 2012-01-12 1895 struct mm_struct *mm = current-mm; fe8c7f5c Cyrill Gorcunov 2012-05-31 1896 struct vm_area_struct *vma; --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
Re: [kbuild] [next:master 2131/2422] kernel/sys.c:1888 prctl_set_mm_map() warn: maybe return -EFAULT instead of the bytes remaining?
On Wed, Aug 27, 2014 at 02:09:09PM +0400, Cyrill Gorcunov wrote: Not really sure I'm follow. @error is error code either 0 (on success) or any other if some problem happened. It's complaining about this: kernel/sys.c 1846 if (prctl_map.auxv_size) { 1847 up_read(mm-mmap_sem); 1848 memset(user_auxv, 0, sizeof(user_auxv)); 1849 error = copy_from_user(user_auxv, 1850 (const void __user *)prctl_map.auxv, 1851 prctl_map.auxv_size); 1852 down_read(mm-mmap_sem); 1853 if (error) 1854 goto out; 1855 } It should say: if (error) { error = -EFAULT; goto out; } regards, dan carpenter ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [linuxtv-media:devel 497/499] drivers/media/platform/s3c-camif/camif-capture.c:118 sensor_set_power() warn: add some parenthesis here?
TO: Mauro Carvalho Chehab m.che...@samsung.com CC: linux-me...@vger.kernel.org Hi Mauro, First bad commit (maybe != root cause): tree: git://linuxtv.org/media_tree.git devel head: 38a0731165250a0a77eff7b90ea3156d44cc7d66 commit: 7155043c2d027c9c848c3d09badb5af2894ed652 [497/499] [media] enable COMPILE_TEST for media drivers :: branch date: 15 hours ago :: commit date: 15 hours ago drivers/media/platform/s3c-camif/camif-capture.c:118 sensor_set_power() warn: add some parenthesis here? drivers/media/platform/s3c-camif/camif-capture.c:134 sensor_set_streaming() warn: add some parenthesis here? drivers/media/platform/s3c-camif/camif-capture.c:463 queue_setup() warn: variable dereferenced before check 'fmt' (see line 460) drivers/media/platform/soc_camera/omap1_camera.c:1599 omap1_cam_probe() error: we previously assumed 'pcdev-pdata' could be null (see line 1581) git remote add linuxtv-media git://linuxtv.org/media_tree.git git remote update linuxtv-media git checkout 7155043c2d027c9c848c3d09badb5af2894ed652 vim +118 drivers/media/platform/s3c-camif/camif-capture.c babde1c2 Sylwester Nawrocki 2012-08-22 112 babde1c2 Sylwester Nawrocki 2012-08-22 113 static int sensor_set_power(struct camif_dev *camif, int on) babde1c2 Sylwester Nawrocki 2012-08-22 114 { babde1c2 Sylwester Nawrocki 2012-08-22 115 struct cam_sensor *sensor = camif-sensor; babde1c2 Sylwester Nawrocki 2012-08-22 116 int err = 0; babde1c2 Sylwester Nawrocki 2012-08-22 117 babde1c2 Sylwester Nawrocki 2012-08-22 @118 if (!on == camif-sensor.power_count) babde1c2 Sylwester Nawrocki 2012-08-22 119 err = v4l2_subdev_call(sensor-sd, core, s_power, on); babde1c2 Sylwester Nawrocki 2012-08-22 120 if (!err) babde1c2 Sylwester Nawrocki 2012-08-22 121 sensor-power_count += on ? 1 : -1; babde1c2 Sylwester Nawrocki 2012-08-22 122 babde1c2 Sylwester Nawrocki 2012-08-22 123 pr_debug(on: %d, power_count: %d, err: %d\n, babde1c2 Sylwester Nawrocki 2012-08-22 124 on, sensor-power_count, err); babde1c2 Sylwester Nawrocki 2012-08-22 125 babde1c2 Sylwester Nawrocki 2012-08-22 126 return err; babde1c2 Sylwester Nawrocki 2012-08-22 127 } babde1c2 Sylwester Nawrocki 2012-08-22 128 babde1c2 Sylwester Nawrocki 2012-08-22 129 static int sensor_set_streaming(struct camif_dev *camif, int on) babde1c2 Sylwester Nawrocki 2012-08-22 130 { babde1c2 Sylwester Nawrocki 2012-08-22 131 struct cam_sensor *sensor = camif-sensor; babde1c2 Sylwester Nawrocki 2012-08-22 132 int err = 0; babde1c2 Sylwester Nawrocki 2012-08-22 133 babde1c2 Sylwester Nawrocki 2012-08-22 @134 if (!on == camif-sensor.stream_count) babde1c2 Sylwester Nawrocki 2012-08-22 135 err = v4l2_subdev_call(sensor-sd, video, s_stream, on); babde1c2 Sylwester Nawrocki 2012-08-22 136 if (!err) babde1c2 Sylwester Nawrocki 2012-08-22 137 sensor-stream_count += on ? 1 : -1; :: The code at line 118 was first introduced by commit :: babde1c243b25592038dd7193867a49729e3d505 [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface :: TO: Sylwester Nawrocki sylvester.nawro...@gmail.com :: CC: Mauro Carvalho Chehab mche...@redhat.com --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] drivers/net/bonding/bond_alb.c:1075:4-7: WARNING: Use BUG_ON
TO: Veaceslav Falico vfal...@gmail.com tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 68e370289c29e3beac99d59c6d840d470af9dfcf commit: 3e403a9faf046862d91c36ef79fb4b12be9a bonding: make it possible to have unlimited nested upper vlans date: 5 weeks ago :: branch date: 18 hours ago :: commit date: 5 weeks ago drivers/net/bonding/bond_alb.c:1075:4-7: WARNING: Use BUG_ON Please consider folding the attached diff :-) --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation From: Fengguang Wu fengguang...@intel.com Subject: [PATCH] bonding: fix coccinelle warnings TO: David S. Miller da...@davemloft.net CC: Veaceslav Falico vfal...@gmail.com CC: net...@vger.kernel.org CC: linux-ker...@vger.kernel.org drivers/net/bonding/bond_alb.c:1075:4-7: WARNING: Use BUG_ON Use BUG_ON instead of a if condition followed by BUG. Semantic patch information: This makes an effort to find cases where BUG() follows an if condition on an expression and replaces the if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. Generated by: scripts/coccinelle/misc/bugon.cocci CC: Veaceslav Falico vfal...@gmail.com CC: David S. Miller da...@davemloft.net Signed-off-by: Fengguang Wu fengguang...@intel.com --- Please take the patch only if it's a positive warning. Thanks! bond_alb.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -1071,8 +1071,7 @@ static void alb_send_learning_packets(st */ if (netif_is_macvlan(upper) !strict_match) { tags = bond_verify_device_path(bond-dev, upper, 0); - if (IS_ERR_OR_NULL(tags)) -BUG(); + BUG_ON(IS_ERR_OR_NULL(tags)); alb_send_lp_vid(slave, upper-dev_addr, tags[0].vlan_proto, tags[0].vlan_id); kfree(tags); ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [drm-intel:drm-intel-next-queued 213/215] drivers/gpu/drm/i915/intel_ringbuffer.c:673 intel_ring_emit_wa() error: buffer overflow 'dev_priv-intel_wa_regs' 16 = 16
TO: Arun Siluvery arun.siluv...@linux.intel.com CC: Daniel Vetter daniel.vet...@ffwll.ch tree: git://anongit.freedesktop.org/drm-intel drm-intel-next-queued head: f949b116bf25700344f07dda3e0e8b91662423d6 commit: 6f0d31150b577274bb154f84de258fc3bd8cd79f [213/215] drm/i915/bdw: Export workaround data to debugfs :: branch date: 26 minutes ago :: commit date: 34 minutes ago drivers/gpu/drm/i915/intel_ringbuffer.c:673 intel_ring_emit_wa() error: buffer overflow 'dev_priv-intel_wa_regs' 16 = 16 drivers/gpu/drm/i915/intel_ringbuffer.c:674 intel_ring_emit_wa() error: buffer overflow 'dev_priv-intel_wa_regs' 16 = 16 drivers/gpu/drm/i915/intel_ringbuffer.c:678 intel_ring_emit_wa() error: buffer overflow 'dev_priv-intel_wa_regs' 16 = 16 git remote add drm-intel git://anongit.freedesktop.org/drm-intel git remote update drm-intel git checkout 6f0d31150b577274bb154f84de258fc3bd8cd79f vim +673 drivers/gpu/drm/i915/intel_ringbuffer.c 6f0d3115 Arun Siluvery 2014-08-26 667 return; 6f0d3115 Arun Siluvery 2014-08-26 668 5f6a65fa Arun Siluvery 2014-08-26 669 intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1)); 5f6a65fa Arun Siluvery 2014-08-26 670 intel_ring_emit(ring, addr); 5f6a65fa Arun Siluvery 2014-08-26 671 intel_ring_emit(ring, value); 6f0d3115 Arun Siluvery 2014-08-26 672 6f0d3115 Arun Siluvery 2014-08-26 @673 dev_priv-intel_wa_regs[dev_priv-num_wa_regs].addr = addr; 6f0d3115 Arun Siluvery 2014-08-26 @674 dev_priv-intel_wa_regs[dev_priv-num_wa_regs].mask = (value) 0x; 6f0d3115 Arun Siluvery 2014-08-26 675 /* value is updated with the status of remaining bits of this 6f0d3115 Arun Siluvery 2014-08-26 676 * register when it is read from debugfs file 6f0d3115 Arun Siluvery 2014-08-26 677 */ 6f0d3115 Arun Siluvery 2014-08-26 @678 dev_priv-intel_wa_regs[dev_priv-num_wa_regs].value = value; 6f0d3115 Arun Siluvery 2014-08-26 679 dev_priv-num_wa_regs++; 6f0d3115 Arun Siluvery 2014-08-26 680 6f0d3115 Arun Siluvery 2014-08-26 681 return; --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [linuxtv-media:devel 497/499] drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON
TO: Mauro Carvalho Chehab m.che...@samsung.com CC: linux-me...@vger.kernel.org Hi Mauro, First bad commit (maybe != root cause): tree: git://linuxtv.org/media_tree.git devel head: 38a0731165250a0a77eff7b90ea3156d44cc7d66 commit: 7155043c2d027c9c848c3d09badb5af2894ed652 [497/499] [media] enable COMPILE_TEST for media drivers :: branch date: 19 hours ago :: commit date: 19 hours ago drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:333:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:406:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:548:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:556:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:509:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:634:4-7: WARNING: Use BUG_ON -- drivers/media/platform/davinci/vpfe_capture.c:946:5-8: Unneeded variable: ret. Return 0 on line 951 Please consider folding the attached diff :-) --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation From: Fengguang Wu fengguang...@intel.com Subject: [PATCH] fix coccinelle warnings TO: Mauro Carvalho Chehab m.che...@samsung.com CC: Mauro Carvalho Chehab m.che...@samsung.com CC: linux-arm-ker...@lists.infradead.org CC: linux-me...@vger.kernel.org CC: linux-ker...@vger.kernel.org CC: devicet...@vger.kernel.org drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:333:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:406:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:548:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:556:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:509:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:634:4-7: WARNING: Use BUG_ON Use BUG_ON instead of a if condition followed by BUG. Semantic patch information: This makes an effort to find cases where BUG() follows an if condition on an expression and replaces the if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. Generated by: scripts/coccinelle/misc/bugon.cocci CC: Mauro Carvalho Chehab m.che...@samsung.com Signed-off-by: Fengguang Wu fengguang...@intel.com --- Please take the patch only if it's a positive warning. Thanks! s5p_mfc.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -329,8 +329,7 @@ static void s5p_mfc_handle_frame(struct ctx-state = MFCINST_RES_CHANGE_INIT; s5p_mfc_hw_call(dev-mfc_ops, clear_int_flags, dev); wake_up_ctx(ctx, reason, err); - if (test_and_clear_bit(0, dev-hw_lock) == 0) - BUG(); + BUG_ON(test_and_clear_bit(0, dev-hw_lock) == 0); s5p_mfc_clock_off(); s5p_mfc_hw_call(dev-mfc_ops, try_run, dev); return; @@ -402,8 +401,7 @@ leave_handle_frame: clear_work_bit(ctx); s5p_mfc_hw_call(dev-mfc_ops, clear_int_flags, dev); wake_up_ctx(ctx, reason, err); - if (test_and_clear_bit(0, dev-hw_lock) == 0) - BUG(); + BUG_ON(test_and_clear_bit(0, dev-hw_lock) == 0); s5p_mfc_clock_off(); /* if suspending, wake up device and do not try_run again*/ if (test_bit(0, dev-enter_suspend)) @@ -450,8 +448,7 @@ static void s5p_mfc_handle_error(struct break; } } - if (test_and_clear_bit(0, dev-hw_lock) == 0) - BUG(); + BUG_ON(test_and_clear_bit(0, dev-hw_lock) == 0); s5p_mfc_hw_call(dev-mfc_ops, clear_int_flags, dev); s5p_mfc_clock_off(); wake_up_dev(dev, reason, err); @@ -505,8 +502,7 @@ static void s5p_mfc_handle_seq_done(stru } s5p_mfc_hw_call(dev-mfc_ops, clear_int_flags, dev); clear_work_bit(ctx); - if (test_and_clear_bit(0, dev-hw_lock) == 0) - BUG(); + BUG_ON(test_and_clear_bit(0, dev-hw_lock) == 0); s5p_mfc_clock_off(); s5p_mfc_hw_call(dev-mfc_ops, try_run, dev); wake_up_ctx(ctx, reason, err); @@ -544,16 +540,14 @@ static void s5p_mfc_handle_init_buffers( } else { ctx-dpb_flush_flag = 0; } - if (test_and_clear_bit(0, dev-hw_lock) == 0) - BUG(); + BUG_ON(test_and_clear_bit(0, dev-hw_lock) == 0); s5p_mfc_clock_off(); wake_up(ctx-queue); s5p_mfc_hw_call(dev-mfc_ops, try_run, dev); } else { - if (test_and_clear_bit(0, dev-hw_lock) == 0) - BUG(); + BUG_ON(test_and_clear_bit(0, dev-hw_lock) == 0); s5p_mfc_clock_off(); @@ -630,8 +624,7 @@ static irqreturn_t s5p_mfc_irq(int irq, mfc_err(post_frame_start() failed\n); s5p_mfc_hw_call(dev-mfc_ops, clear_int_flags, dev); wake_up_ctx(ctx, reason, err); - if (test_and_clear_bit(0, dev-hw_lock) == 0) -BUG(); + BUG_ON(test_and_clear_bit(0, dev-hw_lock) == 0); s5p_mfc_clock_off(); s5p_mfc_hw_call(dev-mfc_ops, try_run, dev); } else {
Re: [kbuild] [linuxtv-media:devel 497/499] drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON
Hi Mauro, On Wed, Aug 27, 2014 at 02:31:37PM -0300, Mauro Carvalho Chehab wrote: Hi Fengguang, Not sure why, but I didn't receive this e-mail (or other emails in this thread). It's a manual check process rather than an email problem. The TO/CC you see lie in the email body. The original email is sent to the kbuild list for manual checking. We do such check for all low confident static check warnings. Julia and Dan are actively looking at these reports and will forward the ones that worth more attention to the relevant people. Thanks, Fengguang Em Wed, 27 Aug 2014 19:07:45 +0200 (CEST) Julia Lawall julia.law...@lip6.fr escreveu: The bug_on one doesn't look like a good idea, but the returnvar one would make the code a little simpler. julia On Thu, 28 Aug 2014, kbuild test robot wrote: TO: Mauro Carvalho Chehab m.che...@samsung.com CC: linux-me...@vger.kernel.org Hi Mauro, First bad commit (maybe != root cause): tree: git://linuxtv.org/media_tree.git devel head: 38a0731165250a0a77eff7b90ea3156d44cc7d66 commit: 7155043c2d027c9c848c3d09badb5af2894ed652 [497/499] [media] enable COMPILE_TEST for media drivers :: branch date: 19 hours ago :: commit date: 19 hours ago drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:333:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:406:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:548:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:556:3-6: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:509:2-5: WARNING: Use BUG_ON drivers/media/platform/s5p-mfc/s5p_mfc.c:634:4-7: WARNING: Use BUG_ON -- drivers/media/platform/davinci/vpfe_capture.c:946:5-8: Unneeded variable: ret. Return 0 on line 951 Please consider folding the attached diff :-) --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild