All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH ipsec-next v2] sky2: Remove redundant assignment and parentheses
@ 2021-10-28  3:15 luo penghao
  2021-10-28 13:50 ` patchwork-bot+netdevbpf
  2021-10-28 14:55 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: luo penghao @ 2021-10-28  3:15 UTC (permalink / raw)
  To: Mirko Lindner
  Cc: Stephen Hemminger, David S . Miller, Jakub Kicinski, netdev,
	linux-kernel, luo penghao, Zeal Robot

The variable err will be reassigned on subsequent branches, and this
assignment does not perform related value operations. This will cause
the double parentheses to be redundant, so the inner parentheses should
be deleted.

clang_analyzer complains as follows:

drivers/net/ethernet/marvell/sky2.c:4988: warning:

Although the value stored to 'err' is used in the enclosing expression,
the value is never actually read from 'err'.

Changes in v2:

modify title category:octeontx2-af to sky2.
delete the inner parentheses.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
 drivers/net/ethernet/marvell/sky2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 8b8bff5..33558aa 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -4985,7 +4985,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	pci_set_master(pdev);
 
 	if (sizeof(dma_addr_t) > sizeof(u32) &&
-	    !(err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)))) {
+	    !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
 		using_dac = 1;
 		err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
 		if (err < 0) {
-- 
2.15.2



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

* Re: [PATCH ipsec-next v2] sky2: Remove redundant assignment and parentheses
  2021-10-28  3:15 [PATCH ipsec-next v2] sky2: Remove redundant assignment and parentheses luo penghao
@ 2021-10-28 13:50 ` patchwork-bot+netdevbpf
  2021-10-28 14:55 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-28 13:50 UTC (permalink / raw)
  To: luo penghao
  Cc: mlindner, stephen, davem, kuba, netdev, linux-kernel, luo.penghao,
	zealci

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 28 Oct 2021 03:15:51 +0000 you wrote:
> The variable err will be reassigned on subsequent branches, and this
> assignment does not perform related value operations. This will cause
> the double parentheses to be redundant, so the inner parentheses should
> be deleted.
> 
> clang_analyzer complains as follows:
> 
> [...]

Here is the summary with links:
  - [ipsec-next,v2] sky2: Remove redundant assignment and parentheses
    https://git.kernel.org/netdev/net-next/c/6a03bfbd5ead

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH ipsec-next v2] sky2: Remove redundant assignment and parentheses
  2021-10-28  3:15 [PATCH ipsec-next v2] sky2: Remove redundant assignment and parentheses luo penghao
  2021-10-28 13:50 ` patchwork-bot+netdevbpf
@ 2021-10-28 14:55 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-10-28 14:55 UTC (permalink / raw)
  To: luo penghao
  Cc: Mirko Lindner, Stephen Hemminger, David S . Miller, netdev,
	linux-kernel, luo penghao, Zeal Robot

On Thu, 28 Oct 2021 03:15:51 +0000 luo penghao wrote:
> The variable err will be reassigned on subsequent branches, and this
> assignment does not perform related value operations. This will cause
> the double parentheses to be redundant, so the inner parentheses should
> be deleted.

Why the "ipsec-next" in the subject? :)

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

end of thread, other threads:[~2021-10-28 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-28  3:15 [PATCH ipsec-next v2] sky2: Remove redundant assignment and parentheses luo penghao
2021-10-28 13:50 ` patchwork-bot+netdevbpf
2021-10-28 14:55 ` Jakub Kicinski

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.