* [PATCH] ssb: Use true and false for bool variable
@ 2021-02-05 6:56 Jiapeng Chong
2021-02-05 21:06 ` Michael Büsch
2021-02-08 11:26 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Jiapeng Chong @ 2021-02-05 6:56 UTC (permalink / raw)
To: m; +Cc: linux-wireless, linux-kernel, Jiapeng Chong
Fix the following coccicheck warnings:
./include/linux/ssb/ssb_driver_gige.h:89:8-9: WARNING: return of 0/1 in
function 'ssb_gige_one_dma_at_once' with return type bool.
./include/linux/ssb/ssb_driver_gige.h:79:8-9: WARNING: return of 0/1 in
function 'ssb_gige_have_roboswitch' with return type bool.
./include/linux/ssb/ssb_driver_gige.h:182:8-9: WARNING: return of 0/1 in
function 'ssb_gige_must_flush_posted_writes' with return type bool.
./include/linux/ssb/ssb_driver_gige.h:178:8-9: WARNING: return of 0/1 in
function 'ssb_gige_one_dma_at_once' with return type bool.
./include/linux/ssb/ssb_driver_gige.h:174:8-9: WARNING: return of 0/1 in
function 'ssb_gige_have_roboswitch' with return type bool.
./include/linux/ssb/ssb_driver_gige.h:170:8-9: WARNING: return of 0/1 in
function 'ssb_gige_is_rgmii' with return type bool.
./include/linux/ssb/ssb_driver_gige.h:162:8-9: WARNING: return of 0/1 in
function 'pdev_is_ssb_gige_core' with return type bool.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
include/linux/ssb/ssb_driver_gige.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
index 31593b3..15ba0df 100644
--- a/include/linux/ssb/ssb_driver_gige.h
+++ b/include/linux/ssb/ssb_driver_gige.h
@@ -76,7 +76,7 @@ static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
if (dev)
return !!(dev->dev->bus->sprom.boardflags_lo &
SSB_GIGE_BFL_ROBOSWITCH);
- return 0;
+ return false;
}
/* Returns whether we can only do one DMA at once. */
@@ -86,7 +86,7 @@ static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
if (dev)
return ((dev->dev->bus->chip_id == 0x4785) &&
(dev->dev->bus->chip_rev < 2));
- return 0;
+ return false;
}
/* Returns whether we must flush posted writes. */
@@ -159,7 +159,7 @@ static inline void ssb_gige_exit(void)
static inline bool pdev_is_ssb_gige_core(struct pci_dev *pdev)
{
- return 0;
+ return false;
}
static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
{
@@ -167,19 +167,19 @@ static inline struct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
}
static inline bool ssb_gige_is_rgmii(struct pci_dev *pdev)
{
- return 0;
+ return false;
}
static inline bool ssb_gige_have_roboswitch(struct pci_dev *pdev)
{
- return 0;
+ return false;
}
static inline bool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
{
- return 0;
+ return false;
}
static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
{
- return 0;
+ return false;
}
static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
{
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ssb: Use true and false for bool variable
2021-02-05 6:56 [PATCH] ssb: Use true and false for bool variable Jiapeng Chong
@ 2021-02-05 21:06 ` Michael Büsch
2021-02-08 11:26 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Michael Büsch @ 2021-02-05 21:06 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: linux-wireless, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
On Fri, 5 Feb 2021 14:56:39 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> Fix the following coccicheck warnings:
Acked-by: Michael Büsch <m@bues.ch>
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ssb: Use true and false for bool variable
2021-02-05 6:56 [PATCH] ssb: Use true and false for bool variable Jiapeng Chong
2021-02-05 21:06 ` Michael Büsch
@ 2021-02-08 11:26 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-02-08 11:26 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: m, linux-wireless, linux-kernel, Jiapeng Chong
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> Fix the following coccicheck warnings:
>
> ./include/linux/ssb/ssb_driver_gige.h:89:8-9: WARNING: return of 0/1 in
> function 'ssb_gige_one_dma_at_once' with return type bool.
>
> ./include/linux/ssb/ssb_driver_gige.h:79:8-9: WARNING: return of 0/1 in
> function 'ssb_gige_have_roboswitch' with return type bool.
>
> ./include/linux/ssb/ssb_driver_gige.h:182:8-9: WARNING: return of 0/1 in
> function 'ssb_gige_must_flush_posted_writes' with return type bool.
>
> ./include/linux/ssb/ssb_driver_gige.h:178:8-9: WARNING: return of 0/1 in
> function 'ssb_gige_one_dma_at_once' with return type bool.
>
> ./include/linux/ssb/ssb_driver_gige.h:174:8-9: WARNING: return of 0/1 in
> function 'ssb_gige_have_roboswitch' with return type bool.
>
> ./include/linux/ssb/ssb_driver_gige.h:170:8-9: WARNING: return of 0/1 in
> function 'ssb_gige_is_rgmii' with return type bool.
>
> ./include/linux/ssb/ssb_driver_gige.h:162:8-9: WARNING: return of 0/1 in
> function 'pdev_is_ssb_gige_core' with return type bool.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Acked-by: Michael Büsch <m@bues.ch>
Patch applied to wireless-drivers-next.git, thanks.
4331667fa14e ssb: Use true and false for bool variable
--
https://patchwork.kernel.org/project/linux-wireless/patch/1612508199-92282-1-git-send-email-jiapeng.chong@linux.alibaba.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ssb: Use true and false for bool variable
[not found] <20211227062159.22746-1-lichaofan@cdjrlc.com>
@ 2021-12-27 12:01 ` Michael Büsch
0 siblings, 0 replies; 4+ messages in thread
From: Michael Büsch @ 2021-12-27 12:01 UTC (permalink / raw)
To: Chaofan Li; +Cc: linux-wireless, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
On Mon, 27 Dec 2021 14:21:59 +0800
Chaofan Li <lichaofan@cdjrlc.com> wrote:
> Signed-off-by: Chaofan Li <lichaofan@cdjrlc.com>
> ---
> include/linux/ssb/ssb_driver_gige.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
> index 15ba0df1ee0d..28c145a51e57 100644
> --- a/include/linux/ssb/ssb_driver_gige.h
> +++ b/include/linux/ssb/ssb_driver_gige.h
> @@ -95,7 +95,7 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
> struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
> if (dev)
> return (dev->dev->bus->chip_id == 0x4785);
> - return 0;
> + return false;
> }
>
> /* Get the device MAC address */
Acked-by: Michael Büsch <m@bues.ch>
--
Michael
https://bues.ch/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-27 12:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 6:56 [PATCH] ssb: Use true and false for bool variable Jiapeng Chong
2021-02-05 21:06 ` Michael Büsch
2021-02-08 11:26 ` Kalle Valo
[not found] <20211227062159.22746-1-lichaofan@cdjrlc.com>
2021-12-27 12:01 ` Michael Büsch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).