All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: sound/soc/codecs/cs35l41.c:1103:60: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
Date: Wed, 26 Jan 2022 10:28:14 +0800	[thread overview]
Message-ID: <202201260938.2jmFi6mS-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Charles Keepax <ckeepax@opensource.cirrus.com>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0280e3c58f92b2fe0e8fbbdf8d386449168de4a8
commit: fe1024d50477becf35128f3ef03bf3525a2cd140 ASoC: cs35l41: Combine adjacent register writes
date:   4 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 4 months ago
compiler: nds32le-linux-gcc (GCC) 11.2.0

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


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> sound/soc/codecs/cs35l41.c:1103:60: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
         irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT |
                                                              ^
   sound/soc/codecs/cs35l41.c:1108:60: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
         irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT |
                                                              ^
>> sound/soc/codecs/rt5682s.c:2297:40: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
      a_map.m_bp << RT5682S_PLLA_M_BP_SFT |
                                          ^
   sound/soc/codecs/rt5682s.c:2315:44: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
      b_map.sel_ps << RT5682S_PLLB_SEL_PS_SFT |
                                              ^
   sound/soc/codecs/rt5682s.c:2316:44: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
      b_map.byp_ps << RT5682S_PLLB_BYP_PS_SFT |
                                              ^
   sound/soc/codecs/rt5682s.c:2317:40: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
      b_map.m_bp << RT5682S_PLLB_M_BP_SFT |
                                          ^

vim +1103 sound/soc/codecs/cs35l41.c

6450ef559056886 David Rhodes   2021-09-07  1094  
6450ef559056886 David Rhodes   2021-09-07  1095  static int cs35l41_irq_gpio_config(struct cs35l41_private *cs35l41)
6450ef559056886 David Rhodes   2021-09-07  1096  {
6450ef559056886 David Rhodes   2021-09-07  1097  	struct cs35l41_irq_cfg *irq_gpio_cfg1 = &cs35l41->pdata.irq_config1;
6450ef559056886 David Rhodes   2021-09-07  1098  	struct cs35l41_irq_cfg *irq_gpio_cfg2 = &cs35l41->pdata.irq_config2;
6450ef559056886 David Rhodes   2021-09-07  1099  	int irq_pol = IRQF_TRIGGER_NONE;
6450ef559056886 David Rhodes   2021-09-07  1100  
fe1024d50477bec Charles Keepax 2021-09-14  1101  	regmap_update_bits(cs35l41->regmap, CS35L41_GPIO1_CTRL1,
fe1024d50477bec Charles Keepax 2021-09-14  1102  			   CS35L41_GPIO_POL_MASK | CS35L41_GPIO_DIR_MASK,
fe1024d50477bec Charles Keepax 2021-09-14 @1103  			   irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT |
fe1024d50477bec Charles Keepax 2021-09-14  1104  			   !irq_gpio_cfg1->irq_out_en << CS35L41_GPIO_DIR_SHIFT);
fe1024d50477bec Charles Keepax 2021-09-14  1105  
fe1024d50477bec Charles Keepax 2021-09-14  1106  	regmap_update_bits(cs35l41->regmap, CS35L41_GPIO2_CTRL1,
fe1024d50477bec Charles Keepax 2021-09-14  1107  			   CS35L41_GPIO_POL_MASK | CS35L41_GPIO_DIR_MASK,
fe1024d50477bec Charles Keepax 2021-09-14  1108  			   irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT |
fe1024d50477bec Charles Keepax 2021-09-14  1109  			   !irq_gpio_cfg1->irq_out_en << CS35L41_GPIO_DIR_SHIFT);
fe1024d50477bec Charles Keepax 2021-09-14  1110  
fe1024d50477bec Charles Keepax 2021-09-14  1111  	regmap_update_bits(cs35l41->regmap, CS35L41_GPIO_PAD_CONTROL,
fe1024d50477bec Charles Keepax 2021-09-14  1112  			   CS35L41_GPIO1_CTRL_MASK | CS35L41_GPIO2_CTRL_MASK,
fe1024d50477bec Charles Keepax 2021-09-14  1113  			   irq_gpio_cfg1->irq_src_sel << CS35L41_GPIO1_CTRL_SHIFT |
fe1024d50477bec Charles Keepax 2021-09-14  1114  			   irq_gpio_cfg2->irq_src_sel << CS35L41_GPIO2_CTRL_SHIFT);
6450ef559056886 David Rhodes   2021-09-07  1115  
6450ef559056886 David Rhodes   2021-09-07  1116  	if ((irq_gpio_cfg2->irq_src_sel ==
6450ef559056886 David Rhodes   2021-09-07  1117  			(CS35L41_GPIO_CTRL_ACTV_LO | CS35L41_VALID_PDATA)) ||
6450ef559056886 David Rhodes   2021-09-07  1118  		(irq_gpio_cfg2->irq_src_sel ==
6450ef559056886 David Rhodes   2021-09-07  1119  			(CS35L41_GPIO_CTRL_OPEN_INT | CS35L41_VALID_PDATA)))
6450ef559056886 David Rhodes   2021-09-07  1120  		irq_pol = IRQF_TRIGGER_LOW;
6450ef559056886 David Rhodes   2021-09-07  1121  	else if (irq_gpio_cfg2->irq_src_sel ==
6450ef559056886 David Rhodes   2021-09-07  1122  			(CS35L41_GPIO_CTRL_ACTV_HI | CS35L41_VALID_PDATA))
6450ef559056886 David Rhodes   2021-09-07  1123  		irq_pol = IRQF_TRIGGER_HIGH;
6450ef559056886 David Rhodes   2021-09-07  1124  
6450ef559056886 David Rhodes   2021-09-07  1125  	return irq_pol;
6450ef559056886 David Rhodes   2021-09-07  1126  }
6450ef559056886 David Rhodes   2021-09-07  1127  

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

             reply	other threads:[~2022-01-26  2:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  2:28 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-15 14:36 sound/soc/codecs/cs35l41.c:1103:60: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202201260938.2jmFi6mS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.