Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/spufs: Remove set but not used variable 'dummy'

Fixes gcc '-Wunused-but-set-variable' warning:
# WARNING: Fixes tag on line 3 doesn't match correct format
# WARNING: Fixes tag on line 3 doesn't match correct format
# WARNING: Fixes tag on line 3 doesn't match correct format
# WARNING: Fixes tag on line 3 doesn't match correct format
# WARNING: Fixes tag on line 3 doesn't match correct format

arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppu_mb_stat':
arch/powerpc/platforms/cell/spufs/switch.c:1660:6: warning:
variable ‘dummy’ set but not used [-Wunused-but-set-variable]

arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppuint_mb_stat':
arch/powerpc/platforms/cell/spufs/switch.c:1675:6: warning:
variable ‘dummy’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210601085127.139598-1-libaokun1@huawei.com

authored by

Baokun Li and committed by
Michael Ellerman
911bacda b629f6c0

+2 -4
+2 -4
arch/powerpc/platforms/cell/spufs/switch.c
··· 1657 1657 static inline void check_ppu_mb_stat(struct spu_state *csa, struct spu *spu) 1658 1658 { 1659 1659 struct spu_problem __iomem *prob = spu->problem; 1660 - u32 dummy = 0; 1661 1660 1662 1661 /* Restore, Step 66: 1663 1662 * If CSA.MB_Stat[P]=0 (mailbox empty) then 1664 1663 * read from the PPU_MB register. 1665 1664 */ 1666 1665 if ((csa->prob.mb_stat_R & 0xFF) == 0) { 1667 - dummy = in_be32(&prob->pu_mb_R); 1666 + in_be32(&prob->pu_mb_R); 1668 1667 eieio(); 1669 1668 } 1670 1669 } ··· 1671 1672 static inline void check_ppuint_mb_stat(struct spu_state *csa, struct spu *spu) 1672 1673 { 1673 1674 struct spu_priv2 __iomem *priv2 = spu->priv2; 1674 - u64 dummy = 0UL; 1675 1675 1676 1676 /* Restore, Step 66: 1677 1677 * If CSA.MB_Stat[I]=0 (mailbox empty) then 1678 1678 * read from the PPUINT_MB register. 1679 1679 */ 1680 1680 if ((csa->prob.mb_stat_R & 0xFF0000) == 0) { 1681 - dummy = in_be64(&priv2->puint_mb_R); 1681 + in_be64(&priv2->puint_mb_R); 1682 1682 eieio(); 1683 1683 spu_int_stat_clear(spu, 2, CLASS2_ENABLE_MAILBOX_INTR); 1684 1684 eieio();