Received: by 10.213.65.68 with SMTP id h4csp3517300imn; Mon, 9 Apr 2018 23:36:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+AtQzrFtp9+iaD/myDyvCxrpK2pZa0aFTvaqdOBeGGkxE08qXjMVKnnWU0UEpCltmuoyGU X-Received: by 10.98.9.134 with SMTP id 6mr1660861pfj.207.1523342163617; Mon, 09 Apr 2018 23:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523342163; cv=none; d=google.com; s=arc-20160816; b=N4Q7ZxMO91Dl7ZjlouL00RAgWIPw+BCaVN5sS5sALuAyVikGxwvNzJRo7ysiE1PLD6 QWw+AuLM3XF83pzHqkkhbn6lwiekZlTvCQFzv/2G5TdSPLfnzRtbNOoDj7bXuDo2sNrM C48NmKVJFQt1AJ/zIVmz5IFIxeMf/juS2Nwefp+5g0IwvXrFm/wEakMh2Jrg7E1nnN3d Jz99vF8RRaEVxERnDhpcVgpSIuj4YZMkcu9iA9wDzJOi9NHfoK/6RTbBeGkj8UlI1QW7 0+fYQ1FeSrVOjERQhWBTP3i1TGzCkiDe5mQTVhna92LeyEWWSQOv58HanioKyNpDEug9 GWTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=z1Hyx/s77Q20HK4i4jjQyckKJ7qgga1FPX989DjUyT8=; b=MHzP6HWYh1JW6lC5upeOGIu9JIrMtaFkvq+IvZSwh6gyLvlZOlEujzzpf91fH3vGp0 u+WLZvDuYGWSagjIXqGLIXU42Aj9HiPowEMZ6XpjUE5rqeo9VLzpE2EIdW924hvF7eCc BkAhAWDtQuKA8uznkZQz8Dv+gmshGpjGGkqvN8zhOUjX9fIdyG2IexOV0wjhjCUr9wi5 8j9K6H31m/K/qB6ox3aRyh0cKotXZgWhNrPFUdOM46yhP6LrSLA1N7dJgerqNbHEIQD3 I52lntWxbR7hYB48TUrdd9b3jRzLPodmXu7N2rUIRfForDuqUyvMIBVuUZqZ20kiwA7b CMng== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=GSnUiUme; 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 s19-v6si1987229plp.558.2018.04.09.23.35.26; Mon, 09 Apr 2018 23:36:03 -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=fail header.i=@gmail.com header.s=20161025 header.b=GSnUiUme; 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 S1752296AbeDJGbs (ORCPT + 99 others); Tue, 10 Apr 2018 02:31:48 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:42214 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbeDJGbq (ORCPT ); Tue, 10 Apr 2018 02:31:46 -0400 Received: by mail-qt0-f195.google.com with SMTP id j3so12088241qtn.9; Mon, 09 Apr 2018 23:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=z1Hyx/s77Q20HK4i4jjQyckKJ7qgga1FPX989DjUyT8=; b=GSnUiUmeAoAva4h+yBBc1aunxPPSfa2hfVdvfp5SkfYImQ81W8PHnsl9tCKJl+AMhq zf8tQ5fy/ioVBYk/QGyYhCK+Zy1yrwTFgPAQLzEJfPO+V5ZFOKg/ItrhBYVL35vdEGyh qO2faY/BWpUwb2Xg+pQtGFxmw1sWJYaHB3s3CABr6KdSkR/LCEhV1/S4C+Oiy1e/xS2t oq3RfSlgXBtcSb3yojSqDIkUbQgPJHLIcLDLpK4EHuzYhea6QKFEKDXiq+OXzzDqOwZf Bm1xpLj9pxF4bgXTofreiH8Xq3DNaATaDQWvbQIroZdoLGyAqaQXpf3QYozAkXUjtF9V IOPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=z1Hyx/s77Q20HK4i4jjQyckKJ7qgga1FPX989DjUyT8=; b=RrMwdU0T/2kPeL1vs6k7A67S9yp8s3lP7sQEhslViFv3hz2bsts/Qp6aV87O3Y+UmG RwailTpqUqi8eZD8ske40OVjSmjMEMF5gJd3HDNPMk4JnvZq0oYqDrsyGkiyYLJhG9zy Zcj13LS4ouZ1xyMkjF4aqHUBIfK3s3iDonWS9mU4ajXFt5gQXce5jCltmRe9gCFzIFge E1cFKk24jcqeQeDQjEDK4wbjV+3vjLnF8DL5skW/fqD+eKb9N8iIRe71AYsCX15yj3vQ tFb3nsO/XN7+uwriuZjg/DA+Db/i8iyeVT9Kk5DXY5N0GtBCnHFCSJnbN5C3gYe5Afs1 ePNA== X-Gm-Message-State: ALQs6tBKxYzljPiv8zJB128x1oTqvQTh7vu0tB+VdQU5rjxm1nu7+nhb C8j4MH0yG/vHaTQfOexUs3Qn8X3/POn+fhxCTyE= X-Received: by 10.200.115.70 with SMTP id q6mr49979594qtp.132.1523341905292; Mon, 09 Apr 2018 23:31:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Mon, 9 Apr 2018 23:31:44 -0700 (PDT) In-Reply-To: <20180408013525.GE3036@codeaurora.org> References: <20180406142832.2243021-1-arnd@arndb.de> <20180408013525.GE3036@codeaurora.org> From: Arnd Bergmann Date: Tue, 10 Apr 2018 08:31:44 +0200 X-Google-Sender-Auth: uqUAEi4u7Ce8kOLjcDTSkB5AE-U Message-ID: Subject: Re: [PATCH 1/3] hexagon: fix ffz/fls/ffs return type To: Richard Kuo Cc: "open list:QUALCOMM HEXAGON..." , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 8, 2018 at 3:35 AM, Richard Kuo wrote: > 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? Yes, that's right. Let's drop my patch for the moment and maybe revisit it later. There were only a couple of warnings in an allmodconfig build from this one, so it might be better change the generic bitops and the more common architectures to all consistently use 'long' or maybe 'unsigned long' as the return type for all those functions. Arnd