Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1254054

Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks

From punit vara <punitvara@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks
Date 2015-10-22 20:30 +0200
Message-ID <qmsMG-299-13@gated-at.bofh.it> (permalink)
References <qm31T-6dh-3@gated-at.bofh.it> <qm31V-6dh-49@gated-at.bofh.it> <qm9qG-7aO-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 22, 2015 at 3:13 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Hello.
>
> On 10/21/2015 05:55 PM, Punit Vara wrote:
>
>> This patch is to the ath10k/pci.h file that fixes following warning
>
>
>    pci.c, you mean?
>
>
>>   reported by coccicheck:
>>
>> WARNING: sum of probable bitmasks, consider |
>>
>> I have replaced + with OR operator | for summing bitmasks
>>
>> Signed-off-by: Punit Vara <punitvara@gmail.com>
>> ---
>>   drivers/net/wireless/ath/ath10k/pci.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/pci.c
>> b/drivers/net/wireless/ath/ath10k/pci.c
>> index 1046ab6..165a318 100644
>> --- a/drivers/net/wireless/ath/ath10k/pci.c
>> +++ b/drivers/net/wireless/ath/ath10k/pci.c
>> @@ -775,7 +775,7 @@ static u32 ath10k_pci_targ_cpu_to_ce_addr(struct
>> ath10k *ar, u32 addr)
>>         switch (ar->hw_rev) {
>>         case ATH10K_HW_QCA988X:
>>         case ATH10K_HW_QCA6174:
>> -               val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
>> +               val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS |
>>                                           CORE_CTRL_ADDRESS) &
>>                        0x7ff) << 21;
>>                 break;
>> @@ -1443,10 +1443,10 @@ static void ath10k_pci_irq_msi_fw_mask(struct
>> ath10k *ar)
>>         switch (ar->hw_rev) {
>>         case ATH10K_HW_QCA988X:
>>         case ATH10K_HW_QCA6174:
>> -               val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
>> +               val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS |
>>                                         CORE_CTRL_ADDRESS);
>>                 val &= ~CORE_CTRL_PCIE_REG_31_MASK;
>> -               ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS +
>> +               ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS |
>
>
>    Don't think these 2 are justified.
>
>
>> @@ -1464,10 +1464,10 @@ static void ath10k_pci_irq_msi_fw_unmask(struct
>> ath10k *ar)
>>         switch (ar->hw_rev) {
>>         case ATH10K_HW_QCA988X:
>>         case ATH10K_HW_QCA6174:
>> -               val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
>> +               val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS |
>>                                         CORE_CTRL_ADDRESS);
>>                 val |= CORE_CTRL_PCIE_REG_31_MASK;
>> -               ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS +
>> +               ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS |
>>                                    CORE_CTRL_ADDRESS, val);
>
>
>    And these too.
>
> [...]
>
> MBR, Sergei
>

 CORE_CTRL_ADDRESS is 0x0000 so it will not mask .. these patch should
be rejected ...I have modified by looking at coccicheck .Actually
First time I have used that tool  I do know it can also generate false
warning sometime .I have experience about checkpatch.pl ..Sorry for
this patch rest I have resend
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/15] Fix warnings reported by coccicheck Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 08/15] net: wireless: simplify return flow for usb_control_msg Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
    Re: [PATCH 08/15] net: wireless: simplify return flow for  usb_control_msg Jiri Slaby <jslaby@suse.cz> - 2015-10-21 17:10 +0200
      Re: [PATCH 08/15] net: wireless: simplify return flow for usb_control_msg punit vara <punitvara@gmail.com> - 2015-10-21 20:10 +0200
  [PATCH 02/15] net: wireless: ath: Remove unnecessary semicolon Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
    Re: [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret  returning 0 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-21 23:50 +0200
      Re: [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret  returning 0 punit vara <punitvara@gmail.com> - 2015-10-22 20:30 +0200
  [PATCH 09/15] net: wireless: simplify return flow for zd1201_setconfig16 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 10/15] net: wireless: ath: simplify return flow for carl9170_regwrite_result() Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 03/15] net: wireless: ath: Remove unnecessary semicolon Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 14/15] net: wireless: ath: Remove unneeded variable ret returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 12/15] net: wireless: brcm80211: Remove unneeded variable which return 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 13/15] net: wireless: brcm80211: Remove unneeded variable ret_code returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing  bitmasks Jiri Slaby <jirislaby@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 04/15] net: wireless: ipw2x00: use | instead of + for summing bitmasks Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 11/15] net: wireless: iwlegacy: Remove unneeded variable ret Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
    Re: [PATCH 11/15] net: wireless: iwlegacy: Remove unneeded variable  ret Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-21 23:50 +0200
  [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
    Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing  bitmasks Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-21 23:50 +0200
      Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks punit vara <punitvara@gmail.com> - 2015-10-22 20:30 +0200
  [PATCH 06/15] net: wireless: rtwifi: Remove duplicated arguments to | Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
  [PATCH 07/15] net: wireless: brcm80211: Remove duplicated arguments to | Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200

csiph-web