Received: by 10.213.65.68 with SMTP id h4csp1120887imn; Sat, 7 Apr 2018 18:39:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx48hfTb6s/emV6hkG+35RnRE1z/wSR9b0sbKtSH6iADdrO+K01bveszVumBtxwFDyVv3zU0X X-Received: by 10.101.98.22 with SMTP id d22mr21859515pgv.344.1523151560141; Sat, 07 Apr 2018 18:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523151560; cv=none; d=google.com; s=arc-20160816; b=eN3aFzGFSUMBmcPDbOFzkRrezJwdxEN2fEblQYr4YaXeK6nR7bRjzt/7Pcemi1LGot CkKrHRjBGKh10BGJukv2Kkx1vrkg29UXcK1iHOOjYGSZOKlVklPGCVoD3DtQWODJ2JuI yB1UXHuann+l1p6WKHX5eHnkNNcA74xpZjicPbhbYRMxys665Z6A5npfPR9axHXTLvSx xIOl3hCx2/e+MKwtxkPoKDmuMbR9L/DiZncZ8u/KnhcZqOC0ROwI5M3VvnK5rxPPA8mr 1wieS7D/G57yA/JzlhCuIWoxg58y6OkaoSVz432oCVT6zyRjdN/lpvGZEcSh3M62YE5H dVhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=tUYQwPraBy9HAZMQAbQWNTW5KWW9aaASXfZ83M+8cBc=; b=z6J46zxN+hIKxIzGSpi2d90obhe2/8OSE1+RhTf4riO8RUq4GFcF88g1hQ/qHKNrD5 kLV4OZbsWeTDE0nxEMQnMYWyFZhPOMIk3ZxZ+SsKIO7qQhJiUBASzLPtgN9VBVQ7voJT i0jHtQStYFASyOpL8kWEOuTBEHXkN00Zfkv9M3hxrAoLQiSUkcMqOHeUDhhwDPESDn6N ui+SojAR24LrnyCgDBf9MBApJk1GHhti6RateDP++EAVmfBJNbM7+cIYOAt1T7Zsnvi2 vDD1K5THh7L1bxA94qTTuFk/RGlsR2ZYkxFuWZmWE5dqR51Vxp41lIFBojFBjOvETqsG xUdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=JKZyPNB9; dkim=pass header.i=@codeaurora.org header.s=default header.b=hFexcBCr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si9254801pgs.475.2018.04.07.18.38.43; Sat, 07 Apr 2018 18:39:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=JKZyPNB9; dkim=pass header.i=@codeaurora.org header.s=default header.b=hFexcBCr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752278AbeDHBfa (ORCPT + 99 others); Sat, 7 Apr 2018 21:35:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43570 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752016AbeDHBf2 (ORCPT ); Sat, 7 Apr 2018 21:35:28 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2AC7B60C65; Sun, 8 Apr 2018 01:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523151328; bh=GEvtb404zT5+/Gp4ZLE0W8dHnOs3CO62LItd6Nb4ibA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JKZyPNB9TaRQB3GQj81CDYAUvCPzU4WA6KTmCayNoEzM7NNyqVgZYaRCl1Kr+dmph T+HZ9gMTvtrzCALjGGPt2h0uNSbfCck8rLDCsOOxQ7GgZrmhKpI5/r+xsG7ooZWxeu HRjjzT/4SZTdoQ36TxntR71+bxg8F3gh1tu77PG4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rkuo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 52BA160540; Sun, 8 Apr 2018 01:35:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523151327; bh=GEvtb404zT5+/Gp4ZLE0W8dHnOs3CO62LItd6Nb4ibA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hFexcBCrXfZDVkEo5oUt76vgWFWfi6ZVgVB7CtyIwBm4BPfxO/AINTixCjK5D1MyS IYMzLZIJpmAoonuchEdK4W/4MQ7BRojDyOUZFM8tKzTIl9y3zl4k3bvS5qMZXeDu2X qb6lOvXq1XlZjPsXF3Y4DCDY+ruS3ZRnTLuvhsV0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 52BA160540 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rkuo@codeaurora.org Date: Sat, 7 Apr 2018 20:35:25 -0500 From: Richard Kuo To: Arnd Bergmann Cc: linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] hexagon: fix ffz/fls/ffs return type Message-ID: <20180408013525.GE3036@codeaurora.org> References: <20180406142832.2243021-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180406142832.2243021-1-arnd@arndb.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 06, 2018 at 04:28:21PM +0200, Arnd Bergmann wrote: > Let's use the same return type as the major architectures to > avoid warnings like > > drivers/ata/libahci_platform.c: In function 'ahci_platform_init_host': > drivers/ata/libahci_platform.c:561:12: warning: comparison of distinct pointer types lacks a cast [enabled by default] > > Signed-off-by: Arnd Bergmann > --- > arch/hexagon/include/asm/bitops.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm/bitops.h > index 5e4a59b3ec1b..8790a50b1f5e 100644 > --- a/arch/hexagon/include/asm/bitops.h > +++ b/arch/hexagon/include/asm/bitops.h > @@ -194,7 +194,7 @@ static inline int __test_bit(int nr, const volatile unsigned long *addr) > * > * Undefined if no zero exists, so code should check against ~0UL first. > */ > -static inline long ffz(int x) > +static inline int ffz(int x) > { > int r; > > @@ -211,7 +211,7 @@ static inline long ffz(int x) > * This is defined the same way as ffs. > * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. > */ > -static inline long fls(int x) > +static inline int fls(int x) > { > int r; > > @@ -232,7 +232,7 @@ static inline long fls(int x) > * the libc and compiler builtin ffs routines, therefore > * differs in spirit from the above ffz (man ffs). > */ > -static inline long ffs(int x) > +static inline int ffs(int x) > { > int r; > Isn't ffz usually long/unsigned long on other architectures? -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project