From: luo penghao Date: Thu, 28 Oct 2021 03:15:51 +0000 (+0000) Subject: sky2: Remove redundant assignment and parentheses X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6a03bfbd5eade19e1943551abba2acd4d9079762;p=uclinux-h8%2Flinux.git sky2: Remove redundant assignment and parentheses 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 Signed-off-by: luo penghao Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 5abb55191e8e..28b5b9341145 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -4910,7 +4910,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) {