From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751108AbeAVL6S (ORCPT ); Mon, 22 Jan 2018 06:58:18 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60852 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751024AbeAVL6Q (ORCPT ); Mon, 22 Jan 2018 06:58:16 -0500 Subject: Re: [PATCH v2] smc: return booleans instead of integers To: "Gustavo A. R. Silva" , "David S. Miller" Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" References: <20180119205450.GA10785@embeddedgus> From: Ursula Braun Date: Mon, 22 Jan 2018 12:58:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180119205450.GA10785@embeddedgus> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18012211-0040-0000-0000-0000042778FA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18012211-0041-0000-0000-000020CAF71B Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-22_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801220171 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/19/2018 09:54 PM, Gustavo A. R. Silva wrote: > Return statements in functions returning bool should use > true/false instead of 1/0. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva > --- > Changes in v2: > - Fix function using_ipsec as suggested by Ursula Braun. > - Update subject line. > > net/smc/smc.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/smc/smc.h b/net/smc/smc.h > index 0bee9d1..6328565 100644 > --- a/net/smc/smc.h > +++ b/net/smc/smc.h > @@ -253,12 +253,12 @@ static inline int smc_uncompress_bufsize(u8 compressed) > static inline bool using_ipsec(struct smc_sock *smc) > { > return (smc->clcsock->sk->sk_policy[0] || > - smc->clcsock->sk->sk_policy[1]) ? 1 : 0; > + smc->clcsock->sk->sk_policy[1]) ? true : false; > } > #else > static inline bool using_ipsec(struct smc_sock *smc) > { > - return 0; > + return false; > } > #endif > Thanks, Gustavo. I have added the patch to our local repository. It will be part of one of my next patch sets to be sent to Dave Miller. Regards, Ursula