All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool
@ 2021-05-20 18:22 kernel test robot
  2021-05-20 18:22 ` [PATCH] scripts/dtc: fix boolreturn.cocci warnings kernel test robot
                   ` (83 more replies)
  0 siblings, 84 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 13194 bytes --]

Hi Lee,

First bad commit (maybe != root cause):

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
config: arc-randconfig-c023-20210520 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool
>> block/blk-throttle.c:911:8-9: WARNING: return of 0/1 in function 'tg_with_in_bps_limit' with return type bool
>> block/blk-throttle.c:869:8-9: WARNING: return of 0/1 in function 'tg_with_in_iops_limit' with return type bool
>> block/blk-throttle.c:760:8-9: WARNING: return of 0/1 in function 'throtl_slice_used' with return type bool
--
>> sound/usb/clock.c:150:9-10: WARNING: return of 0/1 in function 'uac_clock_source_is_valid' with return type bool
--
>> fs/nfsd/nfsfh.c:437:10-11: WARNING: return of 0/1 in function 'fsid_type_ok_for_exp' with return type bool
--
>> net/key/af_key.c:950:2-5: WARNING: Use BUG_ON
   net/key/af_key.c:967:2-5: WARNING: Use BUG_ON
   net/key/af_key.c:3227:2-5: WARNING: Use BUG_ON
   net/key/af_key.c:3243:2-5: WARNING: Use BUG_ON
   net/key/af_key.c:3440:2-5: WARNING: Use BUG_ON
   net/key/af_key.c:3463:2-5: WARNING: Use BUG_ON
   net/key/af_key.c:2117:2-5: WARNING: Use BUG_ON
--
>> net/packet/af_packet.c:551:2-5: WARNING: Use BUG_ON
--
>> fs/ntfs/aops.c:1198:3-6: WARNING: Use BUG_ON
--
>> net/rxrpc/ar-accept.c:381:2-5: WARNING: Use BUG_ON
   net/rxrpc/ar-accept.c:383:2-5: WARNING: Use BUG_ON
--
>> net/rxrpc/ar-ack.c:676:3-6: WARNING: Use BUG_ON
   net/rxrpc/ar-ack.c:806:3-6: WARNING: Use BUG_ON
--
>> net/rxrpc/ar-call.c:625:2-5: WARNING: Use BUG_ON
--
>> net/rxrpc/ar-input.c:689:2-5: WARNING: Use BUG_ON
   net/rxrpc/ar-input.c:482:3-6: WARNING: Use BUG_ON
--
>> net/rxrpc/ar-key.c:847:2-5: WARNING: Use BUG_ON
--
>> net/rxrpc/ar-recvmsg.c:125:4-7: WARNING: Use BUG_ON
   net/rxrpc/ar-recvmsg.c:217:5-8: WARNING: Use BUG_ON
   net/rxrpc/ar-recvmsg.c:242:3-6: WARNING: Use BUG_ON
   net/rxrpc/ar-recvmsg.c:269:4-7: WARNING: Use BUG_ON
   net/rxrpc/ar-recvmsg.c:321:3-6: WARNING: Use BUG_ON
--
>> mm/balloon_compaction.c:99:3-6: WARNING: Use BUG_ON
--
>> net/ipv4/devinet.c:1687:2-5: WARNING: Use BUG_ON
--
>> fs/ocfs2/dlmfs/dlmfs.c:140:2-5: WARNING: Use BUG_ON
   fs/ocfs2/dlmfs/dlmfs.c:187:2-5: WARNING: Use BUG_ON
--
>> fs/ocfs2/dlm/dlmmaster.c:2216:4-7: WARNING: Use BUG_ON
--
>> fs/ocfs2/dlm/dlmrecovery.c:1634:4-7: WARNING: Use BUG_ON
   fs/ocfs2/dlm/dlmrecovery.c:1338:2-5: WARNING: Use BUG_ON
--
>> fs/ocfs2/dlm/dlmthread.c:191:4-7: WARNING: Use BUG_ON
--
>> net/ipv4/esp4.c:295:2-5: WARNING: Use BUG_ON
--
>> fs/afs/flock.c:243:2-5: WARNING: Use BUG_ON
   fs/afs/flock.c:245:2-5: WARNING: Use BUG_ON
   fs/afs/flock.c:143:3-6: WARNING: Use BUG_ON
   fs/afs/flock.c:177:3-6: WARNING: Use BUG_ON
--
>> net/ipv4/icmp.c:925:2-5: WARNING: Use BUG_ON
--
>> net/ipv4/inetpeer.c:356:2-5: WARNING: Use BUG_ON
--
>> fs/ext4/inline.c:997:3-6: WARNING: Use BUG_ON
--
>> fs/ntfs/inode.c:349:2-5: WARNING: Use BUG_ON
   fs/ntfs/inode.c:372:2-5: WARNING: Use BUG_ON
--
>> fs/cachefiles/interface.c:298:3-6: WARNING: Use BUG_ON
--
>> net/ipv4/ip_output.c:712:3-6: WARNING: Use BUG_ON
--
>> fs/reiserfs/journal.c:1112:3-6: WARNING: Use BUG_ON
   fs/reiserfs/journal.c:1397:2-5: WARNING: Use BUG_ON
   fs/reiserfs/journal.c:742:3-6: WARNING: Use BUG_ON
   fs/reiserfs/journal.c:654:2-5: WARNING: Use BUG_ON
   fs/reiserfs/journal.c:656:2-5: WARNING: Use BUG_ON
   fs/reiserfs/journal.c:666:2-5: WARNING: Use BUG_ON
   fs/reiserfs/journal.c:1666:5-8: WARNING: Use BUG_ON
--
>> fs/ocfs2/journal.c:955:2-5: WARNING: Use BUG_ON
   fs/ocfs2/journal.c:1613:3-6: WARNING: Use BUG_ON
   fs/ocfs2/journal.c:1643:2-5: WARNING: Use BUG_ON
--
>> fs/ntfs/mft.c:590:4-7: WARNING: Use BUG_ON
   fs/ntfs/mft.c:783:3-6: WARNING: Use BUG_ON
--
>> fs/ocfs2/namei.c:1223:3-6: WARNING: Use BUG_ON
--
>> drivers/usb/host/oxu210hp-hcd.c:398:2-5: WARNING: Use BUG_ON
   drivers/usb/host/oxu210hp-hcd.c:1714:2-5: WARNING: Use BUG_ON
--
>> net/ipv4/ping.c:613:3-6: WARNING: Use BUG_ON
--
>> drivers/block/pktcdvd.c:1073:3-6: WARNING: Use BUG_ON
   drivers/block/pktcdvd.c:1313:3-6: WARNING: Use BUG_ON
--
>> net/core/rtnetlink.c:1752:4-7: WARNING: Use BUG_ON
--
>> fs/afs/rxrpc.c:152:3-6: WARNING: Use BUG_ON
   fs/afs/rxrpc.c:741:2-5: WARNING: Use BUG_ON
   fs/afs/rxrpc.c:743:2-5: WARNING: Use BUG_ON
   fs/afs/rxrpc.c:855:2-5: WARNING: Use BUG_ON
   fs/afs/rxrpc.c:182:2-5: WARNING: Use BUG_ON
   fs/afs/rxrpc.c:169:3-6: WARNING: Use BUG_ON
   fs/afs/rxrpc.c:673:2-5: WARNING: Use BUG_ON
--
>> drivers/mmc/host/sdhci.c:324:3-6: WARNING: Use BUG_ON
   drivers/mmc/host/sdhci.c:370:3-6: WARNING: Use BUG_ON
--
>> net/core/skbuff.c:1497:2-5: WARNING: Use BUG_ON
   net/core/skbuff.c:1084:2-5: WARNING: Use BUG_ON
   net/core/skbuff.c:986:2-5: WARNING: Use BUG_ON
   net/core/skbuff.c:1220:2-5: WARNING: Use BUG_ON
--
>> mm/slab.c:1474:3-6: WARNING: Use BUG_ON
--
>> net/sunrpc/svc_xprt.c:931:2-5: WARNING: Use BUG_ON
--
>> net/ipv4/tcp_input.c:4658:5-8: WARNING: Use BUG_ON
   net/ipv4/tcp_input.c:4997:4-7: WARNING: Use BUG_ON
--
>> net/ipv4/tcp_minisocks.c:319:5-8: WARNING: Use BUG_ON
--
>> fs/jbd2/transaction.c:2217:2-5: WARNING: Use BUG_ON
--
>> fs/ocfs2/dlmfs/userdlm.c:173:2-5: WARNING: Use BUG_ON
--
>> drivers/virtio/virtio_balloon.c:365:3-6: WARNING: Use BUG_ON
--
>> fs/afs/write.c:336:2-5: WARNING: Use BUG_ON
   fs/afs/write.c:338:2-5: WARNING: Use BUG_ON
   fs/afs/write.c:376:4-7: WARNING: Use BUG_ON
   fs/afs/write.c:378:4-7: WARNING: Use BUG_ON
--
>> net/xfrm/xfrm_policy.c:310:2-5: WARNING: Use BUG_ON
--
>> drivers/media/usb/zr364xx/zr364xx.c:381:2-5: WARNING: Use BUG_ON
--
>> net/nfc/netlink.c:1096:21-24: ERROR: dev is NULL but dereferenced.
--
>> drivers/scsi/libfc/fc_disc.c:595:1-11: second lock on line 599
--
>> sound/core/timer.c:1964:1-11: second lock on line 2002
   sound/core/timer.c:1982:3-13: second lock on line 2002
--
>> fs/binfmt_elf.c:1249:48-67: duplicated argument to && or ||
--
>> security/tomoyo/common.c:603:8-26: duplicated argument to && or ||
--
>> drivers/media/usb/go7007/go7007-usb.c:662:6-63: duplicated argument to && or ||
--
>> drivers/video/backlight/lm3639_bl.c:403:1-3: ERROR: test of a variable/field address
   drivers/video/backlight/lm3639_bl.c:405:1-3: ERROR: test of a variable/field address
--
>> fs/ocfs2/alloc.c:6998:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
--
>> fs/dlm/lockspace.c:679:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
--
>> net/tipc/name_distr.c:278:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
--
>> drivers/power/max8903_charger.c:298:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
   drivers/power/max8903_charger.c:310:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
   drivers/power/max8903_charger.c:322:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
--
>> drivers/mfd/wm831x-auxadc.c:286:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
--
>> drivers/power/wm831x_power.c:569:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
   drivers/power/wm831x_power.c:579:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
   drivers/power/wm831x_power.c:592:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
--
>> drivers/md/bcache/super.c:1392:6-8: ERROR: iterator variable bound on line 1391 cannot be NULL
--
>> drivers/mmc/card/block.c:604:14-21: WARNING opportunity for memdup_user
--
>> drivers/media/dvb-core/dvb_frontend.c:1964:8-15: WARNING opportunity for memdup_user
   drivers/media/dvb-core/dvb_frontend.c:1995:8-15: WARNING opportunity for memdup_user
--
>> drivers/usb/misc/iowarrior.c:373:8-15: WARNING opportunity for memdup_user
--
>> fs/ocfs2/file.c:2454:1-7: preceding lock on line 2357
--
>> net/ipv4/inet_connection_sock.c:247:1-7: preceding lock on line 142
>> net/ipv4/inet_connection_sock.c:247:1-7: preceding lock on line 142
--
>> fs/ocfs2/inode.c:803:2-8: preceding lock on line 754
--
>> fs/ocfs2/ioctl.c:614:1-7: preceding lock on line 550
   fs/ocfs2/ioctl.c:324:1-7: preceding lock on line 290
--
>> fs/ocfs2/localalloc.c:555:1-7: preceding lock on line 516
   fs/ocfs2/localalloc.c:730:1-7: preceding lock on line 653
--
>> fs/ocfs2/refcounttree.c:881:1-7: preceding lock on line 812
--
>> drivers/tty/tty_io.c:2138:1-7: preceding lock on line 2030
--
>> drivers/usb/host/xhci-ring.c:2523:4-10: preceding lock on line 2604
>> drivers/usb/host/xhci-ring.c:2523:4-10: preceding lock on line 2604
   drivers/usb/host/xhci-ring.c:2615:1-7: preceding lock on line 2604
--
>> drivers/usb/serial/cyberjack.c:153:5-11: Unneeded variable: "result". Return "0" on line 165
--
>> drivers/md/bcache/debug.c:248:5-8: Unneeded variable: "ret". Return "0" on line 251
--
>> fs/ocfs2/dlmglue.c:4162:5-11: Unneeded variable: "status". Return "0" on line 4180
--
>> drivers/usb/serial/garmin_gps.c:864:5-11: Unneeded variable: "status". Return "0" on line 874
--
>> drivers/rtc/interface.c:981:5-8: Unneeded variable: "ret". Return "0" on line 986
--
>> net/bluetooth/l2cap_core.c:6546:5-8: Unneeded variable: "err". Return "0" on line 6578
--
>> net/9p/mod.c:174:5-8: Unneeded variable: "ret". Return "0" on line 180
--
>> drivers/mfd/pcf50633-irq.c:58:5-8: Unneeded variable: "ret". Return "0" on line 75
--
>> net/dccp/proto.c:263:5-8: Unneeded variable: "err". Return "0" on line 307
--
>> net/ipv4/route.c:2853:5-7: Unneeded variable: "rc". Return "0" on line 2898
--
>> fs/ocfs2/stack_o2cb.c:77:5-16: Unneeded variable: "o2dlm_flags". Return "0" on line 92
--
>> net/ipv4/tcp.c:2239:5-8: Unneeded variable: "err". Return "0" on line 2305
--
>> net/sunrpc/xprtsock.c:2042:5-8: Unneeded variable: "err". Return "0" on line 2052
--
>> crypto/af_alg.c:489:2-3: Unneeded semicolon
--
>> drivers/bluetooth/bfusb.c:495:2-3: Unneeded semicolon
--
>> fs/ocfs2/dlmglue.c:558:2-3: Unneeded semicolon
--
>> drivers/usb/serial/keyspan.c:1970:49-50: Unneeded semicolon
--
>> drivers/md/md.c:7001:43-44: Unneeded semicolon
--
>> fs/ocfs2/cluster/quorum.c:89:2-3: Unneeded semicolon
--
>> fs/dlm/rcom.c:580:2-3: Unneeded semicolon
--
>> net/tipc/socket.c:2366:2-3: Unneeded semicolon
--
>> sound/core/control.c:55:7-23: WARNING: snd_ctl_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
--
>> net/batman-adv/debugfs.c:106:1-17: WARNING: batadv_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
--
>> net/batman-adv/icmp_socket.c:46:1-17: ERROR: batadv_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
--
>> sound/core/rawmidi.c:388:7-23: WARNING: snd_rawmidi_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
--
>> sound/core/seq/seq_clientmgr.c:325:7-23: WARNING: snd_seq_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
--
>> sound/core/timer.c:1338:7-23: WARNING: snd_timer_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
--
>> mm/balloon_compaction.c:103:8-12: ERROR: invalid reference to the index variable of the iterator on line 65
--
>> net/ipv4/ipmr.c:1090:5-6: ERROR: invalid reference to the index variable of the iterator on line 1041
   net/ipv4/ipmr.c:1149:2-3: ERROR: invalid reference to the index variable of the iterator on line 1138
   net/ipv4/ipmr.c:1195:31-33: ERROR: invalid reference to the index variable of the iterator on line 1181
   net/ipv4/ipmr.c:2371:27-30: ERROR: invalid reference to the index variable of the iterator on line 2386
--
>> net/tipc/subscr.c:250:5-8: ERROR: invalid reference to the index variable of the iterator on line 239
--
>> kernel/debug/debug_core.c:431:2-8: SUGGESTION: printk + WARN_ON_ONCE can be just WARN_ONCE
--
>> drivers/md/raid5.c:547:3-9: SUGGESTION: printk + WARN_ON can be just WARN

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 19307 bytes --]

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix boolreturn.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
@ 2021-05-20 18:22 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (82 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]

From: kernel test robot <lkp@intel.com>

block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool
block/blk-throttle.c:911:8-9: WARNING: return of 0/1 in function 'tg_with_in_bps_limit' with return type bool
block/blk-throttle.c:869:8-9: WARNING: return of 0/1 in function 'tg_with_in_iops_limit' with return type bool
block/blk-throttle.c:760:8-9: WARNING: return of 0/1 in function 'throtl_slice_used' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 blk-throttle.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -757,7 +757,7 @@ static bool throtl_slice_used(struct thr
 	if (time_in_range(jiffies, tg->slice_start[rw], tg->slice_end[rw]))
 		return false;
 
-	return 1;
+	return true;
 }
 
 /* Trim the used slices and adjust slice start accordingly */
@@ -866,7 +866,7 @@ static bool tg_with_in_iops_limit(struct
 
 	if (wait)
 		*wait = jiffy_wait;
-	return 0;
+	return false;
 }
 
 static bool tg_with_in_bps_limit(struct throtl_grp *tg, struct bio *bio,
@@ -908,7 +908,7 @@ static bool tg_with_in_bps_limit(struct
 	jiffy_wait = jiffy_wait + (jiffy_elapsed_rnd - jiffy_elapsed);
 	if (wait)
 		*wait = jiffy_wait;
-	return 0;
+	return false;
 }
 
 /*
@@ -953,7 +953,7 @@ static bool tg_may_dispatch(struct throt
 	    tg_with_in_iops_limit(tg, bio, &iops_wait)) {
 		if (wait)
 			*wait = 0;
-		return 1;
+		return true;
 	}
 
 	max_wait = max(bps_wait, iops_wait);
@@ -964,7 +964,7 @@ static bool tg_may_dispatch(struct throt
 	if (time_before(tg->slice_end[rw], jiffies + max_wait))
 		throtl_extend_slice(tg, rw, jiffies + max_wait);
 
-	return 0;
+	return false;
 }
 
 static void throtl_update_dispatch_stats(struct blkcg_gq *blkg, u64 bytes,

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix boolreturn.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
  2021-05-20 18:22 ` [PATCH] scripts/dtc: fix boolreturn.cocci warnings kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (81 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]

From: kernel test robot <lkp@intel.com>

sound/usb/clock.c:150:9-10: WARNING: return of 0/1 in function 'uac_clock_source_is_valid' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 clock.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -147,12 +147,12 @@ static bool uac_clock_source_is_valid(st
 		snd_usb_find_clock_source(chip->ctrl_intf, source_id);
 
 	if (!cs_desc)
-		return 0;
+		return false;
 
 	/* If a clock source can't tell us whether it's valid, we assume it is */
 	if (!uac2_control_is_readable(cs_desc->bmControls,
 				      UAC2_CS_CONTROL_CLOCK_VALID - 1))
-		return 1;
+		return true;
 
 	err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
 			      USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
@@ -164,7 +164,7 @@ static bool uac_clock_source_is_valid(st
 		dev_warn(&dev->dev,
 			 "%s(): cannot get clock validity for id %d\n",
 			   __func__, source_id);
-		return 0;
+		return false;
 	}
 
 	return !!data;

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix boolreturn.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
  2021-05-20 18:22 ` [PATCH] scripts/dtc: fix boolreturn.cocci warnings kernel test robot
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` [PATCH] scripts/dtc: fix bugon.cocci warnings kernel test robot
                   ` (80 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

From: kernel test robot <lkp@intel.com>

fs/nfsd/nfsfh.c:437:10-11: WARNING: return of 0/1 in function 'fsid_type_ok_for_exp' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 nfsfh.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -434,7 +434,7 @@ static bool fsid_type_ok_for_exp(u8 fsid
 	switch (fsid_type) {
 	case FSID_DEV:
 		if (!old_valid_dev(exp_sb(exp)->s_dev))
-			return 0;
+			return false;
 		/* FALL THROUGH */
 	case FSID_MAJOR_MINOR:
 	case FSID_ENCODE_DEV:
@@ -444,13 +444,13 @@ static bool fsid_type_ok_for_exp(u8 fsid
 	case FSID_UUID8:
 	case FSID_UUID16:
 		if (!is_root_export(exp))
-			return 0;
+			return false;
 		/* fall through */
 	case FSID_UUID4_INUM:
 	case FSID_UUID16_INUM:
 		return exp->ex_uuid != NULL;
 	}
-	return 1;
+	return true;
 }
 
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (2 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (79 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4178 bytes --]

From: kernel test robot <lkp@intel.com>

net/key/af_key.c:950:2-5: WARNING: Use BUG_ON
net/key/af_key.c:967:2-5: WARNING: Use BUG_ON
net/key/af_key.c:3227:2-5: WARNING: Use BUG_ON
net/key/af_key.c:3243:2-5: WARNING: Use BUG_ON
net/key/af_key.c:3440:2-5: WARNING: Use BUG_ON
net/key/af_key.c:3463:2-5: WARNING: Use BUG_ON
net/key/af_key.c:2117:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 af_key.c |   24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -946,8 +946,7 @@ static struct sk_buff *__pfkey_xfrm_stat
 		pfkey_sockaddr_fill(&x->props.saddr, 0,
 				    (struct sockaddr *) (addr + 1),
 				    x->props.family);
-	if (!addr->sadb_address_prefixlen)
-		BUG();
+	BUG_ON(!addr->sadb_address_prefixlen);
 
 	/* dst address */
 	addr = (struct sadb_address*) skb_put(skb,
@@ -963,8 +962,7 @@ static struct sk_buff *__pfkey_xfrm_stat
 		pfkey_sockaddr_fill(&x->id.daddr, 0,
 				    (struct sockaddr *) (addr + 1),
 				    x->props.family);
-	if (!addr->sadb_address_prefixlen)
-		BUG();
+	BUG_ON(!addr->sadb_address_prefixlen);
 
 	if (!xfrm_addr_equal(&x->sel.saddr, &x->props.saddr,
 			     x->props.family)) {
@@ -2110,11 +2108,7 @@ static int pfkey_xfrm_policy2msg(struct
 	addr->sadb_address_proto = pfkey_proto_from_xfrm(xp->selector.proto);
 	addr->sadb_address_prefixlen = xp->selector.prefixlen_s;
 	addr->sadb_address_reserved = 0;
-	if (!pfkey_sockaddr_fill(&xp->selector.saddr,
-				 xp->selector.sport,
-				 (struct sockaddr *) (addr + 1),
-				 xp->family))
-		BUG();
+	BUG_ON(!pfkey_sockaddr_fill(&xp->selector.saddr, xp->selector.sport, (struct sockaddr *)(addr + 1), xp->family));
 
 	/* dst address */
 	addr = (struct sadb_address*) skb_put(skb,
@@ -3223,8 +3217,7 @@ static int pfkey_send_acquire(struct xfr
 		pfkey_sockaddr_fill(&x->props.saddr, 0,
 				    (struct sockaddr *) (addr + 1),
 				    x->props.family);
-	if (!addr->sadb_address_prefixlen)
-		BUG();
+	BUG_ON(!addr->sadb_address_prefixlen);
 
 	/* dst address */
 	addr = (struct sadb_address*) skb_put(skb,
@@ -3239,8 +3232,7 @@ static int pfkey_send_acquire(struct xfr
 		pfkey_sockaddr_fill(&x->id.daddr, 0,
 				    (struct sockaddr *) (addr + 1),
 				    x->props.family);
-	if (!addr->sadb_address_prefixlen)
-		BUG();
+	BUG_ON(!addr->sadb_address_prefixlen);
 
 	pol = (struct sadb_x_policy *)  skb_put(skb, sizeof(struct sadb_x_policy));
 	pol->sadb_x_policy_len = sizeof(struct sadb_x_policy)/sizeof(uint64_t);
@@ -3436,8 +3428,7 @@ static int pfkey_send_new_mapping(struct
 		pfkey_sockaddr_fill(&x->props.saddr, 0,
 				    (struct sockaddr *) (addr + 1),
 				    x->props.family);
-	if (!addr->sadb_address_prefixlen)
-		BUG();
+	BUG_ON(!addr->sadb_address_prefixlen);
 
 	/* NAT_T_SPORT (old port) */
 	n_port = (struct sadb_x_nat_t_port*) skb_put(skb, sizeof (*n_port));
@@ -3459,8 +3450,7 @@ static int pfkey_send_new_mapping(struct
 		pfkey_sockaddr_fill(ipaddr, 0,
 				    (struct sockaddr *) (addr + 1),
 				    x->props.family);
-	if (!addr->sadb_address_prefixlen)
-		BUG();
+	BUG_ON(!addr->sadb_address_prefixlen);
 
 	/* NAT_T_DPORT (new port) */
 	n_port = (struct sadb_x_nat_t_port*) skb_put(skb, sizeof (*n_port));

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (3 preceding siblings ...)
  2021-05-20 18:23 ` [PATCH] scripts/dtc: fix bugon.cocci warnings kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (78 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]

From: kernel test robot <lkp@intel.com>

net/packet/af_packet.c:551:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 af_packet.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -547,8 +547,7 @@ static void prb_setup_retire_blk_timer(s
 {
 	struct tpacket_kbdq_core *pkc;
 
-	if (tx_ring)
-		BUG();
+	BUG_ON(tx_ring);
 
 	pkc = tx_ring ? GET_PBDQC_FROM_RB(&po->tx_ring) :
 			GET_PBDQC_FROM_RB(&po->rx_ring);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (4 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (77 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ntfs/aops.c:1198:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 aops.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -1194,8 +1194,7 @@ lock_retry_remap:
 		tbh = bhs[i];
 		if (!tbh)
 			continue;
-		if (!trylock_buffer(tbh))
-			BUG();
+		BUG_ON(!trylock_buffer(tbh));
 		/* The buffer dirty state is now irrelevant, just clean it. */
 		clear_buffer_dirty(tbh);
 		BUG_ON(!buffer_uptodate(tbh));

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (5 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (76 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

From: kernel test robot <lkp@intel.com>

net/rxrpc/ar-accept.c:381:2-5: WARNING: Use BUG_ON
net/rxrpc/ar-accept.c:383:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ar-accept.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/net/rxrpc/ar-accept.c
+++ b/net/rxrpc/ar-accept.c
@@ -377,10 +377,8 @@ struct rxrpc_call *rxrpc_accept_call(str
 	call->user_call_ID = user_call_ID;
 	rb_link_node(&call->sock_node, parent, pp);
 	rb_insert_color(&call->sock_node, &rx->calls);
-	if (test_and_set_bit(RXRPC_CALL_HAS_USERID, &call->flags))
-		BUG();
-	if (test_and_set_bit(RXRPC_CALL_ACCEPTED, &call->events))
-		BUG();
+	BUG_ON(test_and_set_bit(RXRPC_CALL_HAS_USERID, &call->flags));
+	BUG_ON(test_and_set_bit(RXRPC_CALL_ACCEPTED, &call->events));
 	rxrpc_queue_call(call);
 
 	rxrpc_get_call(call);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (6 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (75 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]

From: kernel test robot <lkp@intel.com>

net/rxrpc/ar-ack.c:676:3-6: WARNING: Use BUG_ON
net/rxrpc/ar-ack.c:806:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ar-ack.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/net/rxrpc/ar-ack.c
+++ b/net/rxrpc/ar-ack.c
@@ -672,8 +672,7 @@ process_further:
 			_debug("extraction failure");
 			goto protocol_error;
 		}
-		if (!skb_pull(skb, sizeof(ack)))
-			BUG();
+		BUG_ON(!skb_pull(skb, sizeof(ack)));
 
 		latest = ntohl(sp->hdr.serial);
 		hard = ntohl(ack.firstPacket);
@@ -802,8 +801,7 @@ all_acked:
 		sp->call = call;
 		rxrpc_get_call(call);
 		spin_lock_bh(&call->lock);
-		if (rxrpc_queue_rcv_skb(call, skb, true, true) < 0)
-			BUG();
+		BUG_ON(rxrpc_queue_rcv_skb(call, skb, true, true) < 0);
 		spin_unlock_bh(&call->lock);
 		goto process_further;
 	}

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (7 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (74 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]

From: kernel test robot <lkp@intel.com>

net/rxrpc/ar-call.c:625:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ar-call.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/rxrpc/ar-call.c
+++ b/net/rxrpc/ar-call.c
@@ -621,8 +621,7 @@ void rxrpc_release_call(struct rxrpc_cal
 	       call->rx_first_oos);
 
 	spin_lock_bh(&call->lock);
-	if (test_and_set_bit(RXRPC_CALL_RELEASED, &call->flags))
-		BUG();
+	BUG_ON(test_and_set_bit(RXRPC_CALL_RELEASED, &call->flags));
 	spin_unlock_bh(&call->lock);
 
 	/* dissociate from the socket

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (8 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (73 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]

From: kernel test robot <lkp@intel.com>

net/rxrpc/ar-input.c:689:2-5: WARNING: Use BUG_ON
net/rxrpc/ar-input.c:482:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ar-input.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/net/rxrpc/ar-input.c
+++ b/net/rxrpc/ar-input.c
@@ -478,8 +478,7 @@ static void rxrpc_process_jumbo_packet(s
 
 		if (skb_copy_bits(jumbo, 0, &jhdr, sizeof(jhdr)) < 0)
 			goto protocol_error;
-		if (!pskb_pull(jumbo, sizeof(jhdr)))
-			BUG();
+		BUG_ON(!pskb_pull(jumbo, sizeof(jhdr)));
 
 		sp->hdr.seq	= htonl(ntohl(sp->hdr.seq) + 1);
 		sp->hdr.serial	= htonl(ntohl(sp->hdr.serial) + 1);
@@ -685,8 +684,7 @@ void rxrpc_data_ready(struct sock *sk)
 	if (skb_copy_bits(skb, sizeof(struct udphdr), &sp->hdr,
 			  sizeof(sp->hdr)) < 0)
 		goto bad_message;
-	if (!pskb_pull(skb, sizeof(struct udphdr) + sizeof(sp->hdr)))
-		BUG();
+	BUG_ON(!pskb_pull(skb, sizeof(struct udphdr) + sizeof(sp->hdr)));
 
 	_net("Rx RxRPC %s ep=%x call=%x:%x",
 	     sp->hdr.flags & RXRPC_CLIENT_INITIATED ? "ToServer" : "ToClient",

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (9 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (72 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]

From: kernel test robot <lkp@intel.com>

net/rxrpc/ar-key.c:847:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ar-key.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/rxrpc/ar-key.c
+++ b/net/rxrpc/ar-key.c
@@ -843,8 +843,7 @@ static int rxrpc_preparse_s(struct key_p
 		return PTR_ERR(ci);
 	}
 
-	if (crypto_blkcipher_setkey(ci, prep->data, 8) < 0)
-		BUG();
+	BUG_ON(crypto_blkcipher_setkey(ci, prep->data, 8) < 0);
 
 	prep->payload[0] = ci;
 	_leave(" = 0");

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (10 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:23 ` kernel test robot
                   ` (71 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2907 bytes --]

From: kernel test robot <lkp@intel.com>

net/rxrpc/ar-recvmsg.c:125:4-7: WARNING: Use BUG_ON
net/rxrpc/ar-recvmsg.c:217:5-8: WARNING: Use BUG_ON
net/rxrpc/ar-recvmsg.c:242:3-6: WARNING: Use BUG_ON
net/rxrpc/ar-recvmsg.c:269:4-7: WARNING: Use BUG_ON
net/rxrpc/ar-recvmsg.c:321:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ar-recvmsg.c |   16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

--- a/net/rxrpc/ar-recvmsg.c
+++ b/net/rxrpc/ar-recvmsg.c
@@ -121,8 +121,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, st
 
 		if (test_bit(RXRPC_CALL_RELEASED, &call->flags)) {
 			_debug("packet from released call");
-			if (skb_dequeue(&rx->sk.sk_receive_queue) != skb)
-				BUG();
+			BUG_ON(skb_dequeue(&rx->sk.sk_receive_queue) != skb);
 			rxrpc_free_skb(skb);
 			continue;
 		}
@@ -212,9 +211,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, st
 			/* last bit of request received */
 			if (!(flags & MSG_PEEK)) {
 				_debug("eat packet");
-				if (skb_dequeue(&rx->sk.sk_receive_queue) !=
-				    skb)
-					BUG();
+				BUG_ON(skb_dequeue(&rx->sk.sk_receive_queue) != skb);
 				rxrpc_free_skb(skb);
 			}
 			msg->msg_flags &= ~MSG_MORE;
@@ -238,8 +235,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, st
 		}
 
 		_debug("eat packet");
-		if (skb_dequeue(&rx->sk.sk_receive_queue) != skb)
-			BUG();
+		BUG_ON(skb_dequeue(&rx->sk.sk_receive_queue) != skb);
 		rxrpc_free_skb(skb);
 	}
 
@@ -265,8 +261,7 @@ receive_non_data_message:
 		if (ret < 0)
 			goto copy_error;
 		if (!(flags & MSG_PEEK)) {
-			if (skb_dequeue(&rx->sk.sk_receive_queue) != skb)
-				BUG();
+			BUG_ON(skb_dequeue(&rx->sk.sk_receive_queue) != skb);
 			rxrpc_free_skb(skb);
 		}
 		goto out;
@@ -317,8 +312,7 @@ terminal_message:
 
 	if (!(flags & MSG_PEEK)) {
 		_net("free terminal skb %p", skb);
-		if (skb_dequeue(&rx->sk.sk_receive_queue) != skb)
-			BUG();
+		BUG_ON(skb_dequeue(&rx->sk.sk_receive_queue) != skb);
 		rxrpc_free_skb(skb);
 		rxrpc_remove_user_ID(rx, call);
 	}

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (11 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:23 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (70 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1600 bytes --]

From: kernel test robot <lkp@intel.com>

mm/balloon_compaction.c:99:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 balloon_compaction.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/mm/balloon_compaction.c
+++ b/mm/balloon_compaction.c
@@ -94,9 +94,7 @@ struct page *balloon_page_dequeue(struct
 		 * an infinite loop while attempting to release all its pages.
 		 */
 		spin_lock_irqsave(&b_dev_info->pages_lock, flags);
-		if (unlikely(list_empty(&b_dev_info->pages) &&
-			     !b_dev_info->isolated_pages))
-			BUG();
+		BUG_ON(unlikely(list_empty(&b_dev_info->pages) && !b_dev_info->isolated_pages));
 		spin_unlock_irqrestore(&b_dev_info->pages_lock, flags);
 		page = NULL;
 	}

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (12 preceding siblings ...)
  2021-05-20 18:23 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (69 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/devinet.c:1687:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 devinet.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1683,8 +1683,7 @@ static int inet_set_link_af(struct net_d
 	if (!in_dev)
 		return -EAFNOSUPPORT;
 
-	if (nla_parse_nested(tb, IFLA_INET_MAX, nla, NULL) < 0)
-		BUG();
+	BUG_ON(nla_parse_nested(tb, IFLA_INET_MAX, nla, NULL) < 0);
 
 	if (tb[IFLA_INET_CONF]) {
 		nla_for_each_nested(a, tb[IFLA_INET_CONF], rem)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (13 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (68 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/dlmfs/dlmfs.c:140:2-5: WARNING: Use BUG_ON
fs/ocfs2/dlmfs/dlmfs.c:187:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 dlmfs.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -136,8 +136,7 @@ static int dlmfs_file_open(struct inode
 	struct dlmfs_filp_private *fp = NULL;
 	struct dlmfs_inode_private *ip;
 
-	if (S_ISDIR(inode->i_mode))
-		BUG();
+	BUG_ON(S_ISDIR(inode->i_mode));
 
 	mlog(0, "open called on inode %lu, flags 0x%x\n", inode->i_ino,
 		file->f_flags);
@@ -183,8 +182,7 @@ static int dlmfs_file_release(struct ino
 	struct dlmfs_inode_private *ip = DLMFS_I(inode);
 	struct dlmfs_filp_private *fp = file->private_data;
 
-	if (S_ISDIR(inode->i_mode))
-		BUG();
+	BUG_ON(S_ISDIR(inode->i_mode));
 
 	mlog(0, "close called on inode %lu\n", inode->i_ino);
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (14 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (67 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/dlm/dlmmaster.c:2216: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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 dlmmaster.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2212,8 +2212,7 @@ static int dlm_pre_master_reco_lockres(s
 		ret = dlm_do_master_requery(dlm, res, nodenum, &master);
 		if (ret < 0) {
 			mlog_errno(ret);
-			if (!dlm_is_host_down(ret))
-				BUG();
+			BUG_ON(!dlm_is_host_down(ret));
 			/* host is down, so answer for that node would be
 			 * DLM_LOCK_RES_OWNER_UNKNOWN.  continue. */
 			ret = 0;

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (15 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (66 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1970 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/dlm/dlmrecovery.c:1634:4-7: WARNING: Use BUG_ON
fs/ocfs2/dlm/dlmrecovery.c:1338:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 dlmrecovery.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1334,8 +1334,7 @@ int dlm_send_one_lockres(struct dlm_ctxt
 error:
 	mlog(ML_ERROR, "%s: dlm_send_mig_lockres_msg returned %d\n",
 	     dlm->name, ret);
-	if (!dlm_is_host_down(ret))
-		BUG();
+	BUG_ON(!dlm_is_host_down(ret));
 	mlog(0, "%s: node %u went down while sending %s "
 	     "lockres %.*s\n", dlm->name, send_to,
 	     flags & DLM_MRES_RECOVERY ?  "recovery" : "migration",
@@ -1630,8 +1629,7 @@ static int dlm_lockres_master_requery(st
 		ret = dlm_do_master_requery(dlm, res, nodenum, real_master);
 		if (ret < 0) {
 			mlog_errno(ret);
-			if (!dlm_is_host_down(ret))
-				BUG();
+			BUG_ON(!dlm_is_host_down(ret));
 			/* host is down, so answer for that node would be
 			 * DLM_LOCK_RES_OWNER_UNKNOWN.  continue. */
 		}

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (16 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (65 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/dlm/dlmthread.c:191: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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 dlmthread.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/ocfs2/dlm/dlmthread.c
+++ b/fs/ocfs2/dlm/dlmthread.c
@@ -187,8 +187,7 @@ static void dlm_purge_lockres(struct dlm
 		/* clear our bit from the master's refmap, ignore errors */
 		ret = dlm_drop_lockres_ref(dlm, res);
 		if (ret < 0) {
-			if (!dlm_is_host_down(ret))
-				BUG();
+			BUG_ON(!dlm_is_host_down(ret));
 		}
 		spin_lock(&dlm->spinlock);
 		spin_lock(&res->spinlock);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (17 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (64 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/esp4.c:295:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 esp4.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -291,8 +291,7 @@ static int esp_input_done2(struct sk_buf
 	if (unlikely(err))
 		goto out;
 
-	if (skb_copy_bits(skb, skb->len-alen-2, nexthdr, 2))
-		BUG();
+	BUG_ON(skb_copy_bits(skb, skb->len - alen - 2, nexthdr, 2));
 
 	err = -EINVAL;
 	padlen = nexthdr[0];

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (18 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (63 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2717 bytes --]

From: kernel test robot <lkp@intel.com>

fs/afs/flock.c:243:2-5: WARNING: Use BUG_ON
fs/afs/flock.c:245:2-5: WARNING: Use BUG_ON
fs/afs/flock.c:143:3-6: WARNING: Use BUG_ON
fs/afs/flock.c:177:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 flock.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

--- a/fs/afs/flock.c
+++ b/fs/afs/flock.c
@@ -139,8 +139,7 @@ void afs_lock_work(struct work_struct *w
 	if (!list_empty(&vnode->granted_locks)) {
 		_debug("extend");
 
-		if (test_and_set_bit(AFS_VNODE_LOCKING, &vnode->flags))
-			BUG();
+		BUG_ON(test_and_set_bit(AFS_VNODE_LOCKING, &vnode->flags));
 		fl = list_entry(vnode->granted_locks.next,
 				struct file_lock, fl_u.afs.link);
 		key = key_get(fl->fl_file->private_data);
@@ -173,8 +172,7 @@ void afs_lock_work(struct work_struct *w
 	if (!list_empty(&vnode->pending_locks)) {
 		_debug("get");
 
-		if (test_and_set_bit(AFS_VNODE_LOCKING, &vnode->flags))
-			BUG();
+		BUG_ON(test_and_set_bit(AFS_VNODE_LOCKING, &vnode->flags));
 		fl = list_entry(vnode->pending_locks.next,
 				struct file_lock, fl_u.afs.link);
 		key = key_get(fl->fl_file->private_data);
@@ -238,11 +236,8 @@ void afs_lock_work(struct work_struct *w
 static void afs_defer_unlock(struct afs_vnode *vnode, struct key *key)
 {
 	cancel_delayed_work(&vnode->lock_work);
-	if (!test_and_clear_bit(AFS_VNODE_READLOCKED, &vnode->flags) &&
-	    !test_and_clear_bit(AFS_VNODE_WRITELOCKED, &vnode->flags))
-		BUG();
-	if (test_and_set_bit(AFS_VNODE_UNLOCKING, &vnode->flags))
-		BUG();
+	BUG_ON(!test_and_clear_bit(AFS_VNODE_READLOCKED, &vnode->flags) && !test_and_clear_bit(AFS_VNODE_WRITELOCKED, &vnode->flags));
+	BUG_ON(test_and_set_bit(AFS_VNODE_UNLOCKING, &vnode->flags));
 	vnode->unlock_key = key_get(key);
 	afs_lock_may_be_available(vnode);
 }

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (19 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (62 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/icmp.c:925:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 icmp.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -921,8 +921,7 @@ static void icmp_timestamp(struct sk_buf
 	 */
 	icmp_param.data.times[1] = inet_current_timestamp();
 	icmp_param.data.times[2] = icmp_param.data.times[1];
-	if (skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4))
-		BUG();
+	BUG_ON(skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4));
 	icmp_param.data.icmph	   = *icmp_hdr(skb);
 	icmp_param.data.icmph.type = ICMP_TIMESTAMPREPLY;
 	icmp_param.data.icmph.code = 0;

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (20 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (61 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/inetpeer.c:356:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 inetpeer.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -352,8 +352,7 @@ static void unlink_from_pool(struct inet
 {
 	struct inet_peer __rcu ***stackptr, ***delp;
 
-	if (lookup(&p->daddr, stack, base) != p)
-		BUG();
+	BUG_ON(lookup(&p->daddr, stack, base) != p);
 	delp = stackptr - 1; /* *delp[0] == p */
 	if (p->avl_left == peer_avl_empty_rcu) {
 		*delp[0] = p->avl_right;

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (21 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (60 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ext4/inline.c:997:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 inline.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -992,9 +992,7 @@ void ext4_show_inline_dir(struct inode *
 		trace_printk("de: off %u rlen %u name %*.s nlen %u ino %u\n",
 			     offset, de_len, de->name_len, de->name,
 			     de->name_len, le32_to_cpu(de->inode));
-		if (ext4_check_dir_entry(dir, NULL, de, bh,
-					 inline_start, inline_size, offset))
-			BUG();
+		BUG_ON(ext4_check_dir_entry(dir, NULL, de, bh, inline_start, inline_size, offset));
 
 		offset += de_len;
 		de = (struct ext4_dir_entry_2 *) ((char *) de + de_len);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (22 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:24 ` kernel test robot
                   ` (59 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ntfs/inode.c:349:2-5: WARNING: Use BUG_ON
fs/ntfs/inode.c:372:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 inode.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -345,8 +345,7 @@ void ntfs_destroy_big_inode(struct inode
 
 	ntfs_debug("Entering.");
 	BUG_ON(ni->page);
-	if (!atomic_dec_and_test(&ni->count))
-		BUG();
+	BUG_ON(!atomic_dec_and_test(&ni->count));
 	call_rcu(&inode->i_rcu, ntfs_i_callback);
 }
 
@@ -368,8 +367,7 @@ static void ntfs_destroy_extent_inode(nt
 {
 	ntfs_debug("Entering.");
 	BUG_ON(ni->page);
-	if (!atomic_dec_and_test(&ni->count))
-		BUG();
+	BUG_ON(!atomic_dec_and_test(&ni->count));
 	kmem_cache_free(ntfs_inode_cache, ni);
 }
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (23 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:24 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (58 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

From: kernel test robot <lkp@intel.com>

fs/cachefiles/interface.c:298:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 interface.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/fs/cachefiles/interface.c
+++ b/fs/cachefiles/interface.c
@@ -293,9 +293,7 @@ static void cachefiles_drop_object(struc
 	/* note that the object is now inactive */
 	if (test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) {
 		write_lock(&cache->active_lock);
-		if (!test_and_clear_bit(CACHEFILES_OBJECT_ACTIVE,
-					&object->flags))
-			BUG();
+		BUG_ON(!test_and_clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags));
 		rb_erase(&object->active_node, &cache->active_nodes);
 		wake_up_bit(&object->flags, CACHEFILES_OBJECT_ACTIVE);
 		write_unlock(&cache->active_lock);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (24 preceding siblings ...)
  2021-05-20 18:24 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (57 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/ip_output.c:712:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ip_output.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -708,8 +708,7 @@ slow_path:
 		/*
 		 *	Copy a block of the IP datagram.
 		 */
-		if (skb_copy_bits(skb, ptr, skb_transport_header(skb2), len))
-			BUG();
+		BUG_ON(skb_copy_bits(skb, ptr, skb_transport_header(skb2), len));
 		left -= len;
 
 		/*

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (25 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (56 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3536 bytes --]

From: kernel test robot <lkp@intel.com>

fs/reiserfs/journal.c:1112:3-6: WARNING: Use BUG_ON
fs/reiserfs/journal.c:1397:2-5: WARNING: Use BUG_ON
fs/reiserfs/journal.c:742:3-6: WARNING: Use BUG_ON
fs/reiserfs/journal.c:654:2-5: WARNING: Use BUG_ON
fs/reiserfs/journal.c:656:2-5: WARNING: Use BUG_ON
fs/reiserfs/journal.c:666:2-5: WARNING: Use BUG_ON
fs/reiserfs/journal.c:1666:5-8: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 journal.c |   23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -650,10 +650,8 @@ static void submit_logged_buffer(struct
 	bh->b_end_io = reiserfs_end_buffer_io_sync;
 	clear_buffer_journal_new(bh);
 	clear_buffer_dirty(bh);
-	if (!test_clear_buffer_journal_test(bh))
-		BUG();
-	if (!buffer_uptodate(bh))
-		BUG();
+	BUG_ON(!test_clear_buffer_journal_test(bh));
+	BUG_ON(!buffer_uptodate(bh));
 	submit_bh(WRITE, bh);
 }
 
@@ -662,8 +660,7 @@ static void submit_ordered_buffer(struct
 	get_bh(bh);
 	bh->b_end_io = reiserfs_end_ordered_io;
 	clear_buffer_dirty(bh);
-	if (!buffer_uptodate(bh))
-		BUG();
+	BUG_ON(!buffer_uptodate(bh));
 	submit_bh(WRITE, bh);
 }
 
@@ -738,8 +735,7 @@ void reiserfs_free_jh(struct buffer_head
 		jh->bh = NULL;
 		list_del_init(&jh->list);
 		kfree(jh);
-		if (atomic_read(&nr_reiserfs_jh) <= 0)
-			BUG();
+		BUG_ON(atomic_read(&nr_reiserfs_jh) <= 0);
 		atomic_dec(&nr_reiserfs_jh);
 		put_bh(bh);
 	}
@@ -1108,8 +1104,7 @@ static int flush_commit_list(struct supe
 	 * the file system.
 	 */
 	if (likely(!retval && !reiserfs_is_journal_aborted (journal))) {
-		if (buffer_dirty(jl->j_commit_bh))
-			BUG();
+		BUG_ON(buffer_dirty(jl->j_commit_bh));
 		mark_buffer_dirty(jl->j_commit_bh) ;
 		depth = reiserfs_write_unlock_nested(s);
 		if (reiserfs_barrier_flush(s))
@@ -1392,9 +1387,7 @@ static int flush_journal_list(struct sup
 	 */
 	flush_commit_list(s, jl, 1);
 
-	if (!(jl->j_state & LIST_DIRTY)
-	    && !reiserfs_is_journal_aborted(journal))
-		BUG();
+	BUG_ON(!(jl->j_state & LIST_DIRTY) && !reiserfs_is_journal_aborted(journal));
 
 	/* are we done now? */
 	if (atomic_read(&jl->j_nonzerolen) <= 0 &&
@@ -1661,9 +1654,7 @@ static int write_one_transaction(struct
 			get_bh(tmp_bh);
 			lock_buffer(tmp_bh);
 			if (cn->bh && can_dirty(cn) && buffer_dirty(tmp_bh)) {
-				if (!buffer_journal_dirty(tmp_bh) ||
-				    buffer_journal_prepared(tmp_bh))
-					BUG();
+				BUG_ON(!buffer_journal_dirty(tmp_bh) || buffer_journal_prepared(tmp_bh));
 				add_to_chunk(chunk, tmp_bh, NULL, write_chunk);
 				ret++;
 			} else {

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (26 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (55 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/journal.c:955:2-5: WARNING: Use BUG_ON
fs/ocfs2/journal.c:1613:3-6: WARNING: Use BUG_ON
fs/ocfs2/journal.c:1643:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 journal.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -951,8 +951,7 @@ void ocfs2_journal_shutdown(struct ocfs2
 		goto done;
 
 	/* need to inc inode use count - jbd2_journal_destroy will iput. */
-	if (!igrab(inode))
-		BUG();
+	BUG_ON(!igrab(inode));
 
 	num_running_trans = atomic_read(&(osb->journal->j_num_trans));
 	trace_ocfs2_journal_shutdown(num_running_trans);
@@ -1609,8 +1608,7 @@ static int ocfs2_replay_journal(struct o
 	status = jbd2_journal_load(journal);
 	if (status < 0) {
 		mlog_errno(status);
-		if (!igrab(inode))
-			BUG();
+		BUG_ON(!igrab(inode));
 		jbd2_journal_destroy(journal);
 		goto done;
 	}
@@ -1639,8 +1637,7 @@ static int ocfs2_replay_journal(struct o
 	if (status < 0)
 		mlog_errno(status);
 
-	if (!igrab(inode))
-		BUG();
+	BUG_ON(!igrab(inode));
 
 	jbd2_journal_destroy(journal);
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (27 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (54 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ntfs/mft.c:590:4-7: WARNING: Use BUG_ON
fs/ntfs/mft.c:783:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 mft.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -586,8 +586,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vo
 		for (i_bhs = 0; i_bhs < nr_bhs; i_bhs++) {
 			struct buffer_head *tbh = bhs[i_bhs];
 
-			if (!trylock_buffer(tbh))
-				BUG();
+			BUG_ON(!trylock_buffer(tbh));
 			BUG_ON(!buffer_uptodate(tbh));
 			clear_buffer_dirty(tbh);
 			get_bh(tbh);
@@ -779,8 +778,7 @@ int write_mft_record_nolock(ntfs_inode *
 	for (i_bhs = 0; i_bhs < nr_bhs; i_bhs++) {
 		struct buffer_head *tbh = bhs[i_bhs];
 
-		if (!trylock_buffer(tbh))
-			BUG();
+		BUG_ON(!trylock_buffer(tbh));
 		BUG_ON(!buffer_uptodate(tbh));
 		clear_buffer_dirty(tbh);
 		get_bh(tbh);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (28 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (53 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/namei.c:1223:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 namei.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -1219,8 +1219,7 @@ static int ocfs2_rename(struct inode *ol
 	osb = OCFS2_SB(old_dir->i_sb);
 
 	if (new_inode) {
-		if (!igrab(new_inode))
-			BUG();
+		BUG_ON(!igrab(new_inode));
 	}
 
 	/* Assume a directory hierarchy thusly:

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (29 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (52 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/usb/host/oxu210hp-hcd.c:398:2-5: WARNING: Use BUG_ON
drivers/usb/host/oxu210hp-hcd.c:1714:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 oxu210hp-hcd.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -394,8 +394,7 @@ static void ehci_quiesce(struct oxu_hcd
 	u32	temp;
 
 #ifdef DEBUG
-	if (!HC_IS_RUNNING(oxu_to_hcd(oxu)->state))
-		BUG();
+	BUG_ON(!HC_IS_RUNNING(oxu_to_hcd(oxu)->state));
 #endif
 
 	/* wait for any schedule enables/disables to take effect */
@@ -1709,9 +1708,7 @@ static void start_unlink_async(struct ox
 
 #ifdef DEBUG
 	assert_spin_locked(&oxu->lock);
-	if (oxu->reclaim || (qh->qh_state != QH_STATE_LINKED
-				&& qh->qh_state != QH_STATE_UNLINK_WAIT))
-		BUG();
+	BUG_ON(oxu->reclaim || (qh->qh_state != QH_STATE_LINKED && qh->qh_state != QH_STATE_UNLINK_WAIT));
 #endif
 
 	/* stop async schedule right now? */

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (30 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (51 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/ping.c:613:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 ping.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -609,8 +609,7 @@ int ping_getfrag(void *from, char *to,
 	struct pingfakehdr *pfh = (struct pingfakehdr *)from;
 
 	if (offset == 0) {
-		if (fraglen < sizeof(struct icmphdr))
-			BUG();
+		BUG_ON(fraglen < sizeof(struct icmphdr));
 		if (csum_partial_copy_fromiovecend(to + sizeof(struct icmphdr),
 			    pfh->iov, 0, fraglen - sizeof(struct icmphdr),
 			    &pfh->wcheck))

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (31 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (50 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/block/pktcdvd.c:1073:3-6: WARNING: Use BUG_ON
drivers/block/pktcdvd.c:1313:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 pktcdvd.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1069,8 +1069,7 @@ static void pkt_gather_data(struct pktcd
 		offset = (f * CD_FRAMESIZE) % PAGE_SIZE;
 		pkt_dbg(2, pd, "Adding frame %d, page:%p offs:%d\n",
 			f, pkt->pages[p], offset);
-		if (!bio_add_page(bio, pkt->pages[p], CD_FRAMESIZE, offset))
-			BUG();
+		BUG_ON(!bio_add_page(bio, pkt->pages[p], CD_FRAMESIZE, offset));
 
 		atomic_inc(&pkt->io_wait);
 		bio->bi_rw = READ;
@@ -1309,8 +1308,7 @@ static void pkt_start_write(struct pktcd
 	for (f = 0; f < pkt->frames; f++) {
 		bvec[f].bv_page = pkt->pages[(f * CD_FRAMESIZE) / PAGE_SIZE];
 		bvec[f].bv_offset = (f * CD_FRAMESIZE) % PAGE_SIZE;
-		if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset))
-			BUG();
+		BUG_ON(!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset));
 	}
 	pkt_dbg(2, pd, "vcnt=%d\n", pkt->w_bio->bi_vcnt);
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (32 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (49 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

From: kernel test robot <lkp@intel.com>

net/core/rtnetlink.c:1752: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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 rtnetlink.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1748,8 +1748,7 @@ static int do_setlink(const struct sk_bu
 		nla_for_each_nested(af, tb[IFLA_AF_SPEC], rem) {
 			const struct rtnl_af_ops *af_ops;
 
-			if (!(af_ops = rtnl_af_lookup(nla_type(af))))
-				BUG();
+			BUG_ON(!(af_ops = rtnl_af_lookup(nla_type(af))));
 
 			err = af_ops->set_link_af(dev, af);
 			if (err < 0)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (33 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (48 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3591 bytes --]

From: kernel test robot <lkp@intel.com>

fs/afs/rxrpc.c:152:3-6: WARNING: Use BUG_ON
fs/afs/rxrpc.c:741:2-5: WARNING: Use BUG_ON
fs/afs/rxrpc.c:743:2-5: WARNING: Use BUG_ON
fs/afs/rxrpc.c:855:2-5: WARNING: Use BUG_ON
fs/afs/rxrpc.c:182:2-5: WARNING: Use BUG_ON
fs/afs/rxrpc.c:169:3-6: WARNING: Use BUG_ON
fs/afs/rxrpc.c:673:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 rxrpc.c |   22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -148,8 +148,7 @@ static void afs_data_delivered(struct sk
 	} else {
 		_debug("DLVR %p{%u} [%d]",
 		       skb, skb->mark, atomic_read(&afs_outstanding_skbs));
-		if (atomic_dec_return(&afs_outstanding_skbs) == -1)
-			BUG();
+		BUG_ON(atomic_dec_return(&afs_outstanding_skbs) == -1);
 		rxrpc_kernel_data_delivered(skb);
 	}
 }
@@ -165,8 +164,7 @@ static void afs_free_skb(struct sk_buff
 	} else {
 		_debug("FREE %p{%u} [%d]",
 		       skb, skb->mark, atomic_read(&afs_outstanding_skbs));
-		if (atomic_dec_return(&afs_outstanding_skbs) == -1)
-			BUG();
+		BUG_ON(atomic_dec_return(&afs_outstanding_skbs) == -1);
 		rxrpc_kernel_free_skb(skb);
 	}
 }
@@ -178,8 +176,7 @@ static void afs_free_call(struct afs_cal
 {
 	_debug("DONE %p{%s} [%d]",
 	       call, call->type->name, atomic_read(&afs_outstanding_calls));
-	if (atomic_dec_return(&afs_outstanding_calls) == -1)
-		BUG();
+	BUG_ON(atomic_dec_return(&afs_outstanding_calls) == -1);
 
 	ASSERTCMP(call->rxcall, ==, NULL);
 	ASSERT(!work_pending(&call->async_work));
@@ -669,8 +666,7 @@ void afs_transfer_reply(struct afs_call
 {
 	size_t len = skb->len;
 
-	if (skb_copy_bits(skb, 0, call->buffer + call->reply_size, len) < 0)
-		BUG();
+	BUG_ON(skb_copy_bits(skb, 0, call->buffer + call->reply_size, len) < 0);
 	call->reply_size += len;
 }
 
@@ -737,10 +733,8 @@ static int afs_deliver_cm_op_id(struct a
 
 	/* the operation ID forms the first four bytes of the request data */
 	len = min_t(size_t, len, 4 - call->offset);
-	if (skb_copy_bits(skb, 0, oibuf + call->offset, len) < 0)
-		BUG();
-	if (!pskb_pull(skb, len))
-		BUG();
+	BUG_ON(skb_copy_bits(skb, 0, oibuf + call->offset, len) < 0);
+	BUG_ON(!pskb_pull(skb, len));
 	call->offset += len;
 
 	if (call->offset < 4) {
@@ -850,9 +844,7 @@ int afs_extract_data(struct afs_call *ca
 	ASSERTCMP(call->offset, <, count);
 
 	len = min_t(size_t, len, count - call->offset);
-	if (skb_copy_bits(skb, 0, buf + call->offset, len) < 0 ||
-	    !pskb_pull(skb, len))
-		BUG();
+	BUG_ON(skb_copy_bits(skb, 0, buf + call->offset, len) < 0 || !pskb_pull(skb, len));
 	call->offset += len;
 
 	if (call->offset < count) {

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (34 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:25 ` kernel test robot
                   ` (47 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/mmc/host/sdhci.c:324:3-6: WARNING: Use BUG_ON
drivers/mmc/host/sdhci.c:370:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 sdhci.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -320,8 +320,7 @@ static void sdhci_read_block_pio(struct
 	local_irq_save(flags);
 
 	while (blksize) {
-		if (!sg_miter_next(&host->sg_miter))
-			BUG();
+		BUG_ON(!sg_miter_next(&host->sg_miter));
 
 		len = min(host->sg_miter.length, blksize);
 
@@ -366,8 +365,7 @@ static void sdhci_write_block_pio(struct
 	local_irq_save(flags);
 
 	while (blksize) {
-		if (!sg_miter_next(&host->sg_miter))
-			BUG();
+		BUG_ON(!sg_miter_next(&host->sg_miter));
 
 		len = min(host->sg_miter.length, blksize);
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (35 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:25 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (46 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]

From: kernel test robot <lkp@intel.com>

net/core/skbuff.c:1497:2-5: WARNING: Use BUG_ON
net/core/skbuff.c:1084:2-5: WARNING: Use BUG_ON
net/core/skbuff.c:986:2-5: WARNING: Use BUG_ON
net/core/skbuff.c:1220:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 skbuff.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -982,8 +982,7 @@ struct sk_buff *skb_copy(const struct sk
 	/* Set the tail pointer and length */
 	skb_put(n, skb->len);
 
-	if (skb_copy_bits(skb, -headerlen, n->head, headerlen + skb->len))
-		BUG();
+	BUG_ON(skb_copy_bits(skb, -headerlen, n->head, headerlen + skb->len));
 
 	copy_skb_header(n, skb);
 	return n;
@@ -1080,8 +1079,7 @@ int pskb_expand_head(struct sk_buff *skb
 
 	BUG_ON(nhead < 0);
 
-	if (skb_shared(skb))
-		BUG();
+	BUG_ON(skb_shared(skb));
 
 	size = SKB_DATA_ALIGN(size);
 
@@ -1215,9 +1213,7 @@ struct sk_buff *skb_copy_expand(const st
 		head_copy_off = newheadroom - head_copy_len;
 
 	/* Copy the linear header and data. */
-	if (skb_copy_bits(skb, -head_copy_len, n->head + head_copy_off,
-			  skb->len + head_copy_len))
-		BUG();
+	BUG_ON(skb_copy_bits(skb, -head_copy_len, n->head + head_copy_off, skb->len + head_copy_len));
 
 	copy_skb_header(n, skb);
 
@@ -1493,8 +1489,7 @@ unsigned char *__pskb_pull_tail(struct s
 			return NULL;
 	}
 
-	if (skb_copy_bits(skb, skb_headlen(skb), skb_tail_pointer(skb), delta))
-		BUG();
+	BUG_ON(skb_copy_bits(skb, skb_headlen(skb), skb_tail_pointer(skb), delta));
 
 	/* Optimization: no fragments, no reasons to preestimate
 	 * size of pulled pages. Superb.

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (36 preceding siblings ...)
  2021-05-20 18:25 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (45 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]

From: kernel test robot <lkp@intel.com>

mm/slab.c:1474:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 slab.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1470,8 +1470,7 @@ void __init kmem_cache_init_late(void)
 	/* 6) resize the head arrays to their final sizes */
 	mutex_lock(&slab_mutex);
 	list_for_each_entry(cachep, &slab_caches, list)
-		if (enable_cpucache(cachep, GFP_NOWAIT))
-			BUG();
+		BUG_ON(enable_cpucache(cachep, GFP_NOWAIT));
 	mutex_unlock(&slab_mutex);
 
 	/* Done! */

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (37 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (44 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

From: kernel test robot <lkp@intel.com>

net/sunrpc/svc_xprt.c:931:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 svc_xprt.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -927,8 +927,7 @@ static void svc_delete_xprt(struct svc_x
 	struct svc_deferred_req *dr;
 
 	/* Only do this once */
-	if (test_and_set_bit(XPT_DEAD, &xprt->xpt_flags))
-		BUG();
+	BUG_ON(test_and_set_bit(XPT_DEAD, &xprt->xpt_flags));
 
 	dprintk("svc: svc_delete_xprt(%p)\n", xprt);
 	xprt->xpt_ops->xpo_detach(xprt);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (38 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (43 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/tcp_input.c:4658:5-8: WARNING: Use BUG_ON
net/ipv4/tcp_input.c:4997: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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 tcp_input.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4654,8 +4654,7 @@ restart:
 			BUG_ON(offset < 0);
 			if (size > 0) {
 				size = min(copy, size);
-				if (skb_copy_bits(skb, offset, skb_put(nskb, size), size))
-					BUG();
+				BUG_ON(skb_copy_bits(skb, offset, skb_put(nskb, size), size));
 				TCP_SKB_CB(nskb)->end_seq += size;
 				copy -= size;
 				start += size;
@@ -4993,8 +4992,7 @@ static void tcp_urg(struct sock *sk, str
 		/* Is the urgent pointer pointing into this packet? */
 		if (ptr < skb->len) {
 			u8 tmp;
-			if (skb_copy_bits(skb, ptr, &tmp, 1))
-				BUG();
+			BUG_ON(skb_copy_bits(skb, ptr, &tmp, 1));
 			tp->urg_data = TCP_URG_VALID | tmp;
 			if (!sock_flag(sk, SOCK_DEAD))
 				sk->sk_data_ready(sk);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (39 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (42 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/tcp_minisocks.c:319:5-8: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 tcp_minisocks.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -315,8 +315,7 @@ void tcp_time_wait(struct sock *sk, int
 			key = tp->af_specific->md5_lookup(sk, sk);
 			if (key != NULL) {
 				tcptw->tw_md5_key = kmemdup(key, sizeof(*key), GFP_ATOMIC);
-				if (tcptw->tw_md5_key && !tcp_alloc_md5sig_pool())
-					BUG();
+				BUG_ON(tcptw->tw_md5_key && !tcp_alloc_md5sig_pool());
 			}
 		} while (0);
 #endif

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (40 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (41 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]

From: kernel test robot <lkp@intel.com>

fs/jbd2/transaction.c:2217:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 transaction.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -2213,8 +2213,7 @@ int jbd2_journal_invalidatepage(journal_
 	int may_free = 1;
 	int ret = 0;
 
-	if (!PageLocked(page))
-		BUG();
+	BUG_ON(!PageLocked(page));
 	if (!page_has_buffers(page))
 		return 0;
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (41 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (40 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/dlmfs/userdlm.c:173:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 userdlm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/ocfs2/dlmfs/userdlm.c
+++ b/fs/ocfs2/dlmfs/userdlm.c
@@ -169,8 +169,7 @@ static inline void user_dlm_grab_inode_r
 {
 	struct inode *inode;
 	inode = user_dlm_inode_from_user_lockres(lockres);
-	if (!igrab(inode))
-		BUG();
+	BUG_ON(!igrab(inode));
 }
 
 static void user_dlm_unblock_lock(struct work_struct *work);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (42 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (39 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/virtio/virtio_balloon.c:365:3-6: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 virtio_balloon.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -360,9 +360,7 @@ static int init_vqs(struct virtio_balloo
 		update_balloon_stats(vb);
 
 		sg_init_one(&sg, vb->stats, sizeof vb->stats);
-		if (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)
-		    < 0)
-			BUG();
+		BUG_ON(virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL) < 0);
 		virtqueue_kick(vb->stats_vq);
 	}
 	return 0;

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (43 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (38 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2085 bytes --]

From: kernel test robot <lkp@intel.com>

fs/afs/write.c:336:2-5: WARNING: Use BUG_ON
fs/afs/write.c:338:2-5: WARNING: Use BUG_ON
fs/afs/write.c:376:4-7: WARNING: Use BUG_ON
fs/afs/write.c:378: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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 write.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -332,10 +332,8 @@ static int afs_write_back_from_locked_pa
 	_enter(",%lx", primary_page->index);
 
 	count = 1;
-	if (!clear_page_dirty_for_io(primary_page))
-		BUG();
-	if (test_set_page_writeback(primary_page))
-		BUG();
+	BUG_ON(!clear_page_dirty_for_io(primary_page));
+	BUG_ON(test_set_page_writeback(primary_page));
 
 	/* find all consecutive lockable dirty pages, stopping when we find a
 	 * page that is not immediately lockable, is not dirty or is missing,
@@ -372,10 +370,8 @@ static int afs_write_back_from_locked_pa
 				unlock_page(page);
 				break;
 			}
-			if (!clear_page_dirty_for_io(page))
-				BUG();
-			if (test_set_page_writeback(page))
-				BUG();
+			BUG_ON(!clear_page_dirty_for_io(page));
+			BUG_ON(test_set_page_writeback(page));
 			unlock_page(page);
 			put_page(page);
 		}

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (44 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` kernel test robot
                   ` (37 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

From: kernel test robot <lkp@intel.com>

net/xfrm/xfrm_policy.c:310:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 xfrm_policy.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -306,8 +306,7 @@ void xfrm_policy_destroy(struct xfrm_pol
 {
 	BUG_ON(!policy->walk.dead);
 
-	if (del_timer(&policy->timer) || del_timer(&policy->polq.hold_timer))
-		BUG();
+	BUG_ON(del_timer(&policy->timer) || del_timer(&policy->polq.hold_timer));
 
 	security_xfrm_policy_free(policy->security);
 	kfree(policy);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix bugon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (45 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:26 ` [PATCH] scripts/dtc: fix ifnullfree.cocci warnings kernel test robot
                   ` (36 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/media/usb/zr364xx/zr364xx.c:381:2-5: 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

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 zr364xx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -377,8 +377,7 @@ static void free_buffer(struct videobuf_
 {
 	_DBG("%s\n", __func__);
 
-	if (in_interrupt())
-		BUG();
+	BUG_ON(in_interrupt());
 
 	videobuf_vmalloc_free(&buf->vb);
 	buf->vb.state = VIDEOBUF_NEEDS_INIT;

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix ifnullfree.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (46 preceding siblings ...)
  2021-05-20 18:26 ` kernel test robot
@ 2021-05-20 18:26 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (35 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/alloc.c:6998:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 alloc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -6994,8 +6994,7 @@ out_commit:
 out:
 	if (data_ac)
 		ocfs2_free_alloc_context(data_ac);
-	if (pages)
-		kfree(pages);
+	kfree(pages);
 
 	return ret;
 }

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix ifnullfree.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (47 preceding siblings ...)
  2021-05-20 18:26 ` [PATCH] scripts/dtc: fix ifnullfree.cocci warnings kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (34 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]

From: kernel test robot <lkp@intel.com>

fs/dlm/lockspace.c:679:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 lockspace.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -675,8 +675,7 @@ static int new_lockspace(const char *nam
 	idr_destroy(&ls->ls_lkbidr);
  out_rsbtbl:
 	for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
-		if (ls->ls_remove_names[i])
-			kfree(ls->ls_remove_names[i]);
+		kfree(ls->ls_remove_names[i]);
 	}
 	vfree(ls->ls_rsbtbl);
  out_lsfree:

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix ifnullfree.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (48 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` [PATCH] scripts/dtc: fix irqf_oneshot.cocci warnings kernel test robot
                   ` (33 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

From: kernel test robot <lkp@intel.com>

net/tipc/name_distr.c:278:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 name_distr.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -274,8 +274,7 @@ static void named_purge_publ(struct publ
 		       publ->key);
 	}
 
-	if (p)
-		kfree(p);
+	kfree(p);
 }
 
 /**

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix irqf_oneshot.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (49 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (32 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2415 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/power/max8903_charger.c:298:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
drivers/power/max8903_charger.c:310:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
drivers/power/max8903_charger.c:322:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

 Make sure threaded IRQs without a primary handler are always request with
 IRQF_ONESHOT

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 max8903_charger.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/power/max8903_charger.c
+++ b/drivers/power/max8903_charger.c
@@ -297,7 +297,7 @@ static int max8903_probe(struct platform
 	if (pdata->dc_valid) {
 		ret = request_threaded_irq(gpio_to_irq(pdata->dok),
 				NULL, max8903_dcin,
-				IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+				IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				"MAX8903 DC IN", data);
 		if (ret) {
 			dev_err(dev, "Cannot request irq %d for DC (%d)\n",
@@ -309,7 +309,7 @@ static int max8903_probe(struct platform
 	if (pdata->usb_valid) {
 		ret = request_threaded_irq(gpio_to_irq(pdata->uok),
 				NULL, max8903_usbin,
-				IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+				IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				"MAX8903 USB IN", data);
 		if (ret) {
 			dev_err(dev, "Cannot request irq %d for USB (%d)\n",
@@ -321,7 +321,7 @@ static int max8903_probe(struct platform
 	if (pdata->flt) {
 		ret = request_threaded_irq(gpio_to_irq(pdata->flt),
 				NULL, max8903_fault,
-				IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+				IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				"MAX8903 Fault", data);
 		if (ret) {
 			dev_err(dev, "Cannot request irq %d for Fault (%d)\n",

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix irqf_oneshot.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (50 preceding siblings ...)
  2021-05-20 18:27 ` [PATCH] scripts/dtc: fix irqf_oneshot.cocci warnings kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (31 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/mfd/wm831x-auxadc.c:286:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

 Make sure threaded IRQs without a primary handler are always request with
 IRQF_ONESHOT

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 wm831x-auxadc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/mfd/wm831x-auxadc.c
+++ b/drivers/mfd/wm831x-auxadc.c
@@ -285,7 +285,8 @@ void wm831x_auxadc_init(struct wm831x *w
 
 		ret = request_threaded_irq(wm831x_irq(wm831x,
 						      WM831X_IRQ_AUXADC_DATA),
-					   NULL, wm831x_auxadc_irq, 0,
+					   NULL, wm831x_auxadc_irq,
+					   IRQF_ONESHOT,
 					   "auxadc", wm831x);
 		if (ret < 0) {
 			dev_err(wm831x->dev, "AUXADC IRQ request failed: %d\n",

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix irqf_oneshot.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (51 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` [PATCH] scripts/dtc: fix itnull.cocci warnings kernel test robot
                   ` (30 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/power/wm831x_power.c:569:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
drivers/power/wm831x_power.c:579:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
drivers/power/wm831x_power.c:592:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

 Make sure threaded IRQs without a primary handler are always request with
 IRQF_ONESHOT

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 wm831x_power.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/power/wm831x_power.c
+++ b/drivers/power/wm831x_power.c
@@ -567,7 +567,8 @@ static int wm831x_power_probe(struct pla
 
 	irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "SYSLO"));
 	ret = request_threaded_irq(irq, NULL, wm831x_syslo_irq,
-				   IRQF_TRIGGER_RISING, "System power low",
+				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+				   "System power low",
 				   power);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "Failed to request SYSLO IRQ %d: %d\n",
@@ -577,7 +578,8 @@ static int wm831x_power_probe(struct pla
 
 	irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "PWR SRC"));
 	ret = request_threaded_irq(irq, NULL, wm831x_pwr_src_irq,
-				   IRQF_TRIGGER_RISING, "Power source",
+				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+				   "Power source",
 				   power);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "Failed to request PWR SRC IRQ %d: %d\n",
@@ -590,7 +592,7 @@ static int wm831x_power_probe(struct pla
 				 platform_get_irq_byname(pdev,
 							 wm831x_bat_irqs[i]));
 		ret = request_threaded_irq(irq, NULL, wm831x_bat_irq,
-					   IRQF_TRIGGER_RISING,
+					   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 					   wm831x_bat_irqs[i],
 					   power);
 		if (ret != 0) {

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix itnull.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (52 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` [PATCH] scripts/dtc: fix returnvar.cocci warnings kernel test robot
                   ` (29 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/md/bcache/super.c:1392:6-8: ERROR: iterator variable bound on line 1391 cannot be NULL

 Many iterators have the property that the first argument is always bound
 to a real list element, never NULL.

Semantic patch information:
 False positives arise for some iterators that do not have this property,
 or in cases when the loop cursor is reassigned.  The latter should only
 happen when the matched code is on the way to a loop exit (break, goto,
 or return).

Generated by: scripts/coccinelle/iterators/itnull.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 super.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1389,11 +1389,12 @@ static void cache_set_free(struct closur
 
 	mutex_lock(&bch_register_lock);
 	for_each_cache(ca, c, i)
-		if (ca) {
+	{ {
 			ca->set = NULL;
 			c->cache[ca->sb.nr_this_dev] = NULL;
 			kobject_put(&ca->kobj);
 		}
+	}
 
 	bch_bset_sort_state_free(&c->sort);
 	free_pages((unsigned long) c->uuids, ilog2(bucket_pages(c)));

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (53 preceding siblings ...)
  2021-05-20 18:27 ` [PATCH] scripts/dtc: fix itnull.cocci warnings kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (28 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/usb/serial/cyberjack.c:153:5-11: Unneeded variable: "result". Return "0" on line 165


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 cyberjack.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -150,7 +150,6 @@ static int  cyberjack_open(struct tty_st
 {
 	struct cyberjack_private *priv;
 	unsigned long flags;
-	int result = 0;
 
 	dev_dbg(&port->dev, "%s - usb_clear_halt\n", __func__);
 	usb_clear_halt(port->serial->dev, port->write_urb->pipe);
@@ -162,7 +161,7 @@ static int  cyberjack_open(struct tty_st
 	priv->wrsent = 0;
 	spin_unlock_irqrestore(&priv->lock, flags);
 
-	return result;
+	return 0;
 }
 
 static void cyberjack_close(struct usb_serial_port *port)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (54 preceding siblings ...)
  2021-05-20 18:27 ` [PATCH] scripts/dtc: fix returnvar.cocci warnings kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (27 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/md/bcache/debug.c:248:5-8: Unneeded variable: "ret". Return "0" on line 251


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 debug.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/md/bcache/debug.c
+++ b/drivers/md/bcache/debug.c
@@ -245,8 +245,6 @@ void bch_debug_exit(void)
 
 int __init bch_debug_init(struct kobject *kobj)
 {
-	int ret = 0;
-
 	debug = debugfs_create_dir("bcache", NULL);
-	return ret;
+	return 0;
 }

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (55 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (26 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/dlmglue.c:4162:5-11: Unneeded variable: "status". Return "0" on line 4180


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 dlmglue.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -4159,7 +4159,6 @@ static int ocfs2_downconvert_thread_shou
 
 static int ocfs2_downconvert_thread(void *arg)
 {
-	int status = 0;
 	struct ocfs2_super *osb = arg;
 
 	/* only quit once we've been asked to stop and there is no more
@@ -4177,7 +4176,7 @@ static int ocfs2_downconvert_thread(void
 	}
 
 	osb->dc_task = NULL;
-	return status;
+	return 0;
 }
 
 void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (56 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:27 ` kernel test robot
                   ` (25 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/usb/serial/garmin_gps.c:864:5-11: Unneeded variable: "status". Return "0" on line 874


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 garmin_gps.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -861,7 +861,6 @@ static int process_resetdev_request(stru
 static int garmin_clear(struct garmin_data *garmin_data_p)
 {
 	unsigned long flags;
-	int status = 0;
 
 	/* flush all queued data */
 	pkt_clear(garmin_data_p);
@@ -871,7 +870,7 @@ static int garmin_clear(struct garmin_da
 	garmin_data_p->outsize = 0;
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 
-	return status;
+	return 0;
 }
 
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (57 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:27 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (24 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/rtc/interface.c:981:5-8: Unneeded variable: "ret". Return "0" on line 986


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 interface.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -978,12 +978,11 @@ int rtc_timer_start(struct rtc_device *r
  */
 int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer)
 {
-	int ret = 0;
 	mutex_lock(&rtc->ops_lock);
 	if (timer->enabled)
 		rtc_timer_remove(rtc, timer);
 	mutex_unlock(&rtc->ops_lock);
-	return ret;
+	return 0;
 }
 
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (58 preceding siblings ...)
  2021-05-20 18:27 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (23 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

From: kernel test robot <lkp@intel.com>

net/bluetooth/l2cap_core.c:6546:5-8: Unneeded variable: "err". Return "0" on line 6578


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 l2cap_core.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -6543,8 +6543,6 @@ static int l2cap_rx(struct l2cap_chan *c
 static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
 			   struct sk_buff *skb)
 {
-	int err = 0;
-
 	BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb,
 	       chan->rx_state);
 
@@ -6575,7 +6573,7 @@ static int l2cap_stream_rx(struct l2cap_
 	chan->last_acked_seq = control->txseq;
 	chan->expected_tx_seq = __next_seq(chan, control->txseq);
 
-	return err;
+	return 0;
 }
 
 static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (59 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (22 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

From: kernel test robot <lkp@intel.com>

net/9p/mod.c:174:5-8: Unneeded variable: "ret". Return "0" on line 180


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 mod.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/net/9p/mod.c
+++ b/net/9p/mod.c
@@ -171,13 +171,11 @@ void v9fs_put_trans(struct p9_trans_modu
  */
 static int __init init_p9(void)
 {
-	int ret = 0;
-
 	p9_error_init();
 	pr_info("Installing 9P2000 support\n");
 	p9_trans_fd_init();
 
-	return ret;
+	return 0;
 }
 
 /**

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (60 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (21 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/mfd/pcf50633-irq.c:58:5-8: Unneeded variable: "ret". Return "0" on line 75


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 pcf50633-irq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/mfd/pcf50633-irq.c
+++ b/drivers/mfd/pcf50633-irq.c
@@ -55,7 +55,7 @@ EXPORT_SYMBOL_GPL(pcf50633_free_irq);
 static int __pcf50633_irq_mask_set(struct pcf50633 *pcf, int irq, u8 mask)
 {
 	u8 reg, bit;
-	int ret = 0, idx;
+	int idx;
 
 	idx = irq >> 3;
 	reg = PCF50633_REG_INT1M + idx;
@@ -72,7 +72,7 @@ static int __pcf50633_irq_mask_set(struc
 
 	mutex_unlock(&pcf->lock);
 
-	return ret;
+	return 0;
 }
 
 int pcf50633_irq_mask(struct pcf50633 *pcf, int irq)

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (61 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (20 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

From: kernel test robot <lkp@intel.com>

net/dccp/proto.c:263:5-8: Unneeded variable: "err". Return "0" on line 307


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 proto.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -260,7 +260,6 @@ int dccp_disconnect(struct sock *sk, int
 	struct inet_connection_sock *icsk = inet_csk(sk);
 	struct inet_sock *inet = inet_sk(sk);
 	struct dccp_sock *dp = dccp_sk(sk);
-	int err = 0;
 	const int old_state = sk->sk_state;
 
 	if (old_state != DCCP_CLOSED)
@@ -304,7 +303,7 @@ int dccp_disconnect(struct sock *sk, int
 	WARN_ON(inet->inet_num && !icsk->icsk_bind_hash);
 
 	sk->sk_error_report(sk);
-	return err;
+	return 0;
 }
 
 EXPORT_SYMBOL_GPL(dccp_disconnect);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (62 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (19 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/route.c:2853:5-7: Unneeded variable: "rc". Return "0" on line 2898


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 route.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2850,8 +2850,6 @@ struct ip_rt_acct __percpu *ip_rt_acct _
 
 int __init ip_rt_init(void)
 {
-	int rc = 0;
-
 	ip_idents = kmalloc(IP_IDENTS_SZ * sizeof(*ip_idents), GFP_KERNEL);
 	if (!ip_idents)
 		panic("IP: failed to allocate ip_idents\n");
@@ -2895,7 +2893,7 @@ int __init ip_rt_init(void)
 #endif
 	register_pernet_subsys(&rt_genid_ops);
 	register_pernet_subsys(&ipv4_inetpeer_ops);
-	return rc;
+	return 0;
 }
 
 #ifdef CONFIG_SYSCTL

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (63 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (18 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/stack_o2cb.c:77:5-16: Unneeded variable: "o2dlm_flags". Return "0" on line 92


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 stack_o2cb.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -74,8 +74,6 @@ static inline int mode_to_o2dlm(int mode
 	}
 static int flags_to_o2dlm(u32 flags)
 {
-	int o2dlm_flags = 0;
-
 	map_flag(DLM_LKF_NOQUEUE, LKM_NOQUEUE);
 	map_flag(DLM_LKF_CANCEL, LKM_CANCEL);
 	map_flag(DLM_LKF_CONVERT, LKM_CONVERT);
@@ -89,7 +87,7 @@ static int flags_to_o2dlm(u32 flags)
 	/* map_flag() should have cleared every flag passed in */
 	BUG_ON(flags != 0);
 
-	return o2dlm_flags;
+	return 0;
 }
 #undef map_flag
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (64 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (17 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

From: kernel test robot <lkp@intel.com>

net/ipv4/tcp.c:2239:5-8: Unneeded variable: "err". Return "0" on line 2305


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 tcp.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2236,7 +2236,6 @@ int tcp_disconnect(struct sock *sk, int
 	struct inet_sock *inet = inet_sk(sk);
 	struct inet_connection_sock *icsk = inet_csk(sk);
 	struct tcp_sock *tp = tcp_sk(sk);
-	int err = 0;
 	int old_state = sk->sk_state;
 
 	if (old_state != TCP_CLOSE)
@@ -2302,7 +2301,7 @@ int tcp_disconnect(struct sock *sk, int
 	}
 
 	sk->sk_error_report(sk);
-	return err;
+	return 0;
 }
 EXPORT_SYMBOL(tcp_disconnect);
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix returnvar.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (65 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` [PATCH] scripts/dtc: fix semicolon.cocci warnings kernel test robot
                   ` (16 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

From: kernel test robot <lkp@intel.com>

net/sunrpc/xprtsock.c:2042:5-8: Unneeded variable: "err". Return "0" on line 2052


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 xprtsock.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2039,7 +2039,6 @@ int xs_swapper(struct rpc_xprt *xprt, in
 {
 	struct sock_xprt *transport = container_of(xprt, struct sock_xprt,
 			xprt);
-	int err = 0;
 
 	if (enable) {
 		xprt->swapper++;
@@ -2049,7 +2048,7 @@ int xs_swapper(struct rpc_xprt *xprt, in
 		sk_clear_memalloc(transport->inet);
 	}
 
-	return err;
+	return 0;
 }
 EXPORT_SYMBOL_GPL(xs_swapper);
 #else

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (66 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (15 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

From: kernel test robot <lkp@intel.com>

crypto/af_alg.c:489:2-3: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 af_alg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -486,7 +486,7 @@ int af_alg_wait_for_completion(int err,
 		reinit_completion(&completion->completion);
 		err = completion->err;
 		break;
-	};
+	}
 
 	return err;
 }

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (67 preceding siblings ...)
  2021-05-20 18:28 ` [PATCH] scripts/dtc: fix semicolon.cocci warnings kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:28 ` kernel test robot
                   ` (14 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/bluetooth/bfusb.c:495:2-3: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 bfusb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -492,7 +492,7 @@ static int bfusb_send_frame(struct hci_d
 	case HCI_SCODATA_PKT:
 		hdev->stat.sco_tx++;
 		break;
-	};
+	}
 
 	/* Prepend skb with frame type */
 	memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (68 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:28 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (13 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/dlmglue.c:558:2-3: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 dlmglue.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -555,7 +555,7 @@ void ocfs2_inode_lock_res_init(struct oc
 			mlog_bug_on_msg(1, "type: %d\n", type);
 			ops = NULL; /* thanks, gcc */
 			break;
-	};
+	}
 
 	ocfs2_build_lock_name(type, OCFS2_I(inode)->ip_blkno,
 			      generation, res->l_name);

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (69 preceding siblings ...)
  2021-05-20 18:28 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (12 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/usb/serial/keyspan.c:1970:49-50: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 keyspan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -1967,7 +1967,7 @@ static int keyspan_usa49_send_setup(stru
 	if (d_details->product_id == keyspan_usa49wg_product_id) {
 		dr = (void *)(s_priv->ctrl_buf);
 		dr->bRequestType = USB_TYPE_VENDOR | USB_DIR_OUT;
-		dr->bRequest = 0xB0;	/* 49wg control message */;
+		dr->bRequest = 0xB0;	/* 49wg control message */
 		dr->wValue = 0;
 		dr->wIndex = 0;
 		dr->wLength = cpu_to_le16(sizeof(msg));

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (70 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (11 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/md/md.c:7001:43-44: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 md.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6998,7 +6998,7 @@ static unsigned int mdstat_poll(struct f
 	int mask;
 
 	if (md_unloading)
-		return POLLIN|POLLRDNORM|POLLERR|POLLPRI;;
+		return POLLIN|POLLRDNORM|POLLERR|POLLPRI;
 	poll_wait(filp, &md_event_waiters, wait);
 
 	/* always allow read */

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (71 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (10 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

From: kernel test robot <lkp@intel.com>

fs/ocfs2/cluster/quorum.c:89:2-3: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 quorum.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/ocfs2/cluster/quorum.c
+++ b/fs/ocfs2/cluster/quorum.c
@@ -86,7 +86,7 @@ static void o2quo_fence_self(void)
 		       "system by restarting ***\n");
 		emergency_restart();
 		break;
-	};
+	}
 }
 
 /* Indicate that a timeout occurred on a hearbeat region write. The

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (72 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (9 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

From: kernel test robot <lkp@intel.com>

fs/dlm/rcom.c:580:2-3: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 rcom.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -577,7 +577,7 @@ void dlm_receive_rcom(struct dlm_ls *ls,
 		lock = 1;
 		reply = 1;
 		break;
-	};
+	}
 
 	spin_lock(&ls->ls_recover_lock);
 	status = ls->ls_recover_status;

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix semicolon.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (73 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` [PATCH] scripts/dtc: fix stream_open.cocci warnings kernel test robot
                   ` (8 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]

From: kernel test robot <lkp@intel.com>

net/tipc/socket.c:2366:2-3: Unneeded semicolon


 Removes unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 socket.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -2363,7 +2363,7 @@ int tipc_sk_ref_table_init(u32 req_sz, u
 	req_sz++;
 	for (actual_sz = 16; actual_sz < req_sz; actual_sz <<= 1) {
 		/* do nothing */
-	};
+	}
 
 	/* allocate table & mark all entries as uninitialized */
 	table = vzalloc(actual_sz * sizeof(struct reference));

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix stream_open.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (74 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (7 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

From: kernel test robot <lkp@intel.com>

sound/core/control.c:55:7-23: WARNING: snd_ctl_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.

Generated by: scripts/coccinelle/api/stream_open.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 control.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -52,7 +52,7 @@ static int snd_ctl_open(struct inode *in
 	struct snd_ctl_file *ctl;
 	int err;
 
-	err = nonseekable_open(inode, file);
+	err = stream_open(inode, file);
 	if (err < 0)
 		return err;
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix stream_open.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (75 preceding siblings ...)
  2021-05-20 18:29 ` [PATCH] scripts/dtc: fix stream_open.cocci warnings kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (6 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

From: kernel test robot <lkp@intel.com>

net/batman-adv/debugfs.c:106:1-17: WARNING: batadv_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.

Generated by: scripts/coccinelle/api/stream_open.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 debugfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/batman-adv/debugfs.c
+++ b/net/batman-adv/debugfs.c
@@ -103,7 +103,7 @@ static int batadv_log_open(struct inode
 	if (!try_module_get(THIS_MODULE))
 		return -EBUSY;
 
-	nonseekable_open(inode, file);
+	stream_open(inode, file);
 	file->private_data = inode->i_private;
 	return 0;
 }

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix stream_open.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (76 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (5 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

From: kernel test robot <lkp@intel.com>

net/batman-adv/icmp_socket.c:46:1-17: ERROR: batadv_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.

Generated by: scripts/coccinelle/api/stream_open.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 icmp_socket.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/batman-adv/icmp_socket.c
+++ b/net/batman-adv/icmp_socket.c
@@ -43,7 +43,7 @@ static int batadv_socket_open(struct ino
 	if (!try_module_get(THIS_MODULE))
 		return -EBUSY;
 
-	nonseekable_open(inode, file);
+	stream_open(inode, file);
 
 	socket_client = kmalloc(sizeof(*socket_client), GFP_KERNEL);
 	if (!socket_client) {

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix stream_open.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (77 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (4 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

From: kernel test robot <lkp@intel.com>

sound/core/rawmidi.c:388:7-23: WARNING: snd_rawmidi_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.

Generated by: scripts/coccinelle/api/stream_open.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 rawmidi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -385,7 +385,7 @@ static int snd_rawmidi_open(struct inode
 	if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK)) 
 		return -EINVAL;		/* invalid combination */
 
-	err = nonseekable_open(inode, file);
+	err = stream_open(inode, file);
 	if (err < 0)
 		return err;
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix stream_open.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (78 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:29 ` kernel test robot
                   ` (3 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

From: kernel test robot <lkp@intel.com>

sound/core/seq/seq_clientmgr.c:325:7-23: WARNING: snd_seq_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.

Generated by: scripts/coccinelle/api/stream_open.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 seq_clientmgr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -322,7 +322,7 @@ static int snd_seq_open(struct inode *in
 	struct snd_seq_user_client *user;
 	int err;
 
-	err = nonseekable_open(inode, file);
+	err = stream_open(inode, file);
 	if (err < 0)
 		return err;
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix stream_open.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (79 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:29 ` kernel test robot
  2021-05-20 18:30 ` [PATCH] scripts/dtc: fix warn.cocci warnings kernel test robot
                   ` (2 subsequent siblings)
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

From: kernel test robot <lkp@intel.com>

sound/core/timer.c:1338:7-23: WARNING: snd_timer_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.

Generated by: scripts/coccinelle/api/stream_open.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1335,7 +1335,7 @@ static int snd_timer_user_open(struct in
 	struct snd_timer_user *tu;
 	int err;
 
-	err = nonseekable_open(inode, file);
+	err = stream_open(inode, file);
 	if (err < 0)
 		return err;
 

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix warn.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (80 preceding siblings ...)
  2021-05-20 18:29 ` kernel test robot
@ 2021-05-20 18:30 ` kernel test robot
  2021-05-20 18:30 ` kernel test robot
  2021-05-21  6:52 ` [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool Lee Jones
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:30 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]

From: kernel test robot <lkp@intel.com>

kernel/debug/debug_core.c:431:2-8: SUGGESTION: printk + WARN_ON_ONCE can be just WARN_ONCE

 Use WARN(1,...) rather than printk followed by WARN_ON(1)

Generated by: scripts/coccinelle/misc/warn.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

 debug_core.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -428,9 +428,9 @@ static int kgdb_reenter_check(struct kgd
 		exception_level = 0;
 		kgdb_skipexception(ks->ex_vector, ks->linux_regs);
 		dbg_activate_sw_breakpoints();
-		printk(KERN_CRIT "KGDB: re-enter error: breakpoint removed %lx\n",
-			addr);
-		WARN_ON_ONCE(1);
+		WARN_ONCE(1,
+			  KERN_CRIT "KGDB: re-enter error: breakpoint removed %lx\n",
+			  addr);
 
 		return 1;
 	}

^ permalink raw reply	[flat|nested] 86+ messages in thread

* [PATCH] scripts/dtc: fix warn.cocci warnings
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (81 preceding siblings ...)
  2021-05-20 18:30 ` [PATCH] scripts/dtc: fix warn.cocci warnings kernel test robot
@ 2021-05-20 18:30 ` kernel test robot
  2021-05-21  6:52 ` [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool Lee Jones
  83 siblings, 0 replies; 86+ messages in thread
From: kernel test robot @ 2021-05-20 18:30 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/md/raid5.c:547:3-9: SUGGESTION: printk + WARN_ON can be just WARN

 Use WARN(1,...) rather than printk followed by WARN_ON(1)

Generated by: scripts/coccinelle/misc/warn.cocci

Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 raid5.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -543,13 +543,11 @@ retry:
 		struct r5dev *dev = &sh->dev[i];
 
 		if (dev->toread || dev->read || dev->towrite || dev->written ||
-		    test_bit(R5_LOCKED, &dev->flags)) {
-			printk(KERN_ERR "sector=%llx i=%d %p %p %p %p %d\n",
+		    test_bit(R5_LOCKED, &dev->flags))
+			WARN(1, KERN_ERR "sector=%llx i=%d %p %p %p %p %d\n",
 			       (unsigned long long)sh->sector, i, dev->toread,
 			       dev->read, dev->towrite, dev->written,
 			       test_bit(R5_LOCKED, &dev->flags));
-			WARN_ON(1);
-		}
 		dev->flags = 0;
 		raid5_build_block(sh, i, previous);
 	}

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool
  2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
                   ` (82 preceding siblings ...)
  2021-05-20 18:30 ` kernel test robot
@ 2021-05-21  6:52 ` Lee Jones
  2021-05-21  7:03   ` Rong Chen
  83 siblings, 1 reply; 86+ messages in thread
From: Lee Jones @ 2021-05-21  6:52 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

On Fri, 21 May 2021, kernel test robot wrote:

> Hi Lee,
> 
> First bad commit (maybe != root cause):
> 
> tree:   https://android.googlesource.com/kernel/goldfish android-3.18

Please ...

a) I'm pretty sure I've asked for this kernel not to be tested.
b) Why have you sent me an 83 strong patch-set for a 7 year-old kernel?

Please could you make the necessary changes.

> head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
> commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
> config: arc-randconfig-c023-20210520 (attached as .config)
> compiler: arceb-elf-gcc (GCC) 9.3.0
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> cocci warnings: (new ones prefixed by >>)
> >> block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool
> >> block/blk-throttle.c:911:8-9: WARNING: return of 0/1 in function 'tg_with_in_bps_limit' with return type bool
> >> block/blk-throttle.c:869:8-9: WARNING: return of 0/1 in function 'tg_with_in_iops_limit' with return type bool
> >> block/blk-throttle.c:760:8-9: WARNING: return of 0/1 in function 'throtl_slice_used' with return type bool



-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 86+ messages in thread

* Re: [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool
  2021-05-21  6:52 ` [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool Lee Jones
@ 2021-05-21  7:03   ` Rong Chen
  0 siblings, 0 replies; 86+ messages in thread
From: Rong Chen @ 2021-05-21  7:03 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1821 bytes --]



On 5/21/21 2:52 PM, Lee Jones wrote:
> On Fri, 21 May 2021, kernel test robot wrote:
>
>> Hi Lee,
>>
>> First bad commit (maybe != root cause):
>>
>> tree:   https://android.googlesource.com/kernel/goldfish android-3.18
> Please ...
>
> a) I'm pretty sure I've asked for this kernel not to be tested.


Hi Lee,

Sorry for the inconvenience, we have ignored the branch in your tree:

https://github.com/intel/lkp-tests/blob/master/repo/linux/lee-linaro#L6

but another tree contains the branch too:

   tree: https://android.googlesource.com/kernel/goldfish android-3.18

we'll only send the reports to the tree owner.

> b) Why have you sent me an 83 strong patch-set for a 7 year-old kernel?

the kernel was updated recently and triggered the bisections by randconfigs.

>
> Please could you make the necessary changes.

Sure, it's our fault.

Best Regards,
Rong Chen


>
>> head:   dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
>> commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC global declaration
>> config: arc-randconfig-c023-20210520 (attached as .config)
>> compiler: arceb-elf-gcc (GCC) 9.3.0
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>>
>> cocci warnings: (new ones prefixed by >>)
>>>> block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool
>>>> block/blk-throttle.c:911:8-9: WARNING: return of 0/1 in function 'tg_with_in_bps_limit' with return type bool
>>>> block/blk-throttle.c:869:8-9: WARNING: return of 0/1 in function 'tg_with_in_iops_limit' with return type bool
>>>> block/blk-throttle.c:760:8-9: WARNING: return of 0/1 in function 'throtl_slice_used' with return type bool
>
>

^ permalink raw reply	[flat|nested] 86+ messages in thread

end of thread, other threads:[~2021-05-21  7:03 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 18:22 [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool kernel test robot
2021-05-20 18:22 ` [PATCH] scripts/dtc: fix boolreturn.cocci warnings kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` [PATCH] scripts/dtc: fix bugon.cocci warnings kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:23 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:24 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:25 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` kernel test robot
2021-05-20 18:26 ` [PATCH] scripts/dtc: fix ifnullfree.cocci warnings kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:27 ` [PATCH] scripts/dtc: fix irqf_oneshot.cocci warnings kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:27 ` [PATCH] scripts/dtc: fix itnull.cocci warnings kernel test robot
2021-05-20 18:27 ` [PATCH] scripts/dtc: fix returnvar.cocci warnings kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:27 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` [PATCH] scripts/dtc: fix semicolon.cocci warnings kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:28 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` [PATCH] scripts/dtc: fix stream_open.cocci warnings kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:29 ` kernel test robot
2021-05-20 18:30 ` [PATCH] scripts/dtc: fix warn.cocci warnings kernel test robot
2021-05-20 18:30 ` kernel test robot
2021-05-21  6:52 ` [android-goldfish:android-3.18 396/1051] block/blk-throttle.c:956:9-10: WARNING: return of 0/1 in function 'tg_may_dispatch' with return type bool Lee Jones
2021-05-21  7:03   ` Rong Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.