mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] net: phy: mscc: fix excluded_middle.cocci warnings
@ 2020-11-15 18:37 Julia Lawall
  2020-11-16 15:23 ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2020-11-15 18:37 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit, Russell King,
	Jakub Kicinski, Antoine Tenart, Quentin Schulz,
	kernel test robot
  Cc: kbuild-all, linux-kernel, Denis Efremov

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

Condition !A || A && B is equivalent to !A || B.

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

Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script")
CC: Denis Efremov <efremov@linux.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e28c0d7c92c89016c12a677616668957351e7542
commit: b76f0ea013125358d1b4ca147a6f9b6883dd2493 coccinelle: misc: add excluded_middle.cocci script
:::::: branch date: 8 hours ago
:::::: commit date: 8 weeks ago

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

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

--- a/drivers/net/phy/mscc/mscc_ptp.c
+++ b/drivers/net/phy/mscc/mscc_ptp.c
@@ -136,7 +136,7 @@ static void vsc85xx_ts_write_csr(struct

 	phy_ts_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_1588);

-	if (!cond || (cond && upper))
+	if (!cond || upper)
 		phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_MSB, upper);

 	phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_LSB, lower);

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

* Re: [PATCH] net: phy: mscc: fix excluded_middle.cocci warnings
  2020-11-15 18:37 [PATCH] net: phy: mscc: fix excluded_middle.cocci warnings Julia Lawall
@ 2020-11-16 15:23 ` Jakub Kicinski
  2020-11-16 15:26   ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2020-11-16 15:23 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Andrew Lunn, Florian Fainelli, Heiner Kallweit, Russell King,
	Antoine Tenart, Quentin Schulz, kernel test robot, kbuild-all,
	linux-kernel, Denis Efremov

On Sun, 15 Nov 2020 19:37:59 +0100 (CET) Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
> 
> Condition !A || A && B is equivalent to !A || B.
> 
> Generated by: scripts/coccinelle/misc/excluded_middle.cocci
> 
> Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script")
> CC: Denis Efremov <efremov@linux.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

cc netdev plz!

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

* Re: [PATCH] net: phy: mscc: fix excluded_middle.cocci warnings
  2020-11-16 15:23 ` Jakub Kicinski
@ 2020-11-16 15:26   ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2020-11-16 15:26 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Julia Lawall, Andrew Lunn, Florian Fainelli, Heiner Kallweit,
	Russell King, Antoine Tenart, Quentin Schulz, kernel test robot,
	kbuild-all, linux-kernel, Denis Efremov



On Mon, 16 Nov 2020, Jakub Kicinski wrote:

> On Sun, 15 Nov 2020 19:37:59 +0100 (CET) Julia Lawall wrote:
> > From: kernel test robot <lkp@intel.com>
> >
> > Condition !A || A && B is equivalent to !A || B.
> >
> > Generated by: scripts/coccinelle/misc/excluded_middle.cocci
> >
> > Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script")
> > CC: Denis Efremov <efremov@linux.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
>
> cc netdev plz!

OK, I will send it again.  I sent it to everyone in the list generated by
0-day.  I don't know how they calculate the list, though.

julia

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

end of thread, other threads:[~2020-11-16 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 18:37 [PATCH] net: phy: mscc: fix excluded_middle.cocci warnings Julia Lawall
2020-11-16 15:23 ` Jakub Kicinski
2020-11-16 15:26   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®