Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5204576imm; Sun, 22 Jul 2018 16:05:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcrvCMJ1Axdmb69C9gyFZEpXLB9EjfHx+pzlB8MYyTg6WaOWdg/3xder0MhEcLj3S/ReGIH X-Received: by 2002:a63:f309:: with SMTP id l9-v6mr9749258pgh.369.1532300746492; Sun, 22 Jul 2018 16:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532300746; cv=none; d=google.com; s=arc-20160816; b=OSkaNmp6JLH8N+gMr0Zw6Y2YFETxtjrfOFzUIfUKuw4G6S0giw4qf3qFkcQEkARWrZ Oj9fWoD3ZS3Pm6YdmySQxeZJBlINMkkmCnELdYO/9yLfiYA03GgslR+EGdB4utbhIjCB YU6gy4K3Mfm9qCwEXkEcQgEb3Xwxhbqj9jod2LG3TyK1YOCTzAYZlXZg4I8fpaVRT/XK KgjD1tK0wd3orY6fQLUzhKBVEVxf6vMcYwtboPLgW+KQ5naJSFUGa9QwWrxUrIjNL93i tJjTQiz72JxX2IoSRxGx8155gM6CXoPVAm2/bialYww2s+QzGOMShJEGP7508DEYjvXD MDog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature:arc-authentication-results; bh=M770uUMf1iV4jfjW22Asp+Mq5Cz000cm54ec0TOI4zU=; b=BIQ6OLPlAvz7mR7KUWCWeuIwIISuDYC8kRwCe97xqiQqoEoZLFnGsDHp0VUOMoa3x4 fSZqmq8SJ0/1o6qcUPoqfHItku7VuRT9F2mXPgJaB7io1MbGYh51YiKXJjCb1lVNHH84 96kZFT/zdQw+f79r8j/K+o4/khnwEd2XbtV3M6rGDPQ62XW7WTyHfID+exq7mN+dx5d0 bH4dMMpz7FBTpWelmAgn0ak+3zWHSFvGkrNQSTGUByEug8kEPDnRSBvzznBCVa6zdlj7 8TBxwSQKqc4lDAc/pfJI50FzqhMTC93ctTssdtYOAp0LphlZzLQuBSFdYALbCMX+BRUC I6bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=sYU5NY63; 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 o33-v6si6661712pld.170.2018.07.22.16.05.19; Sun, 22 Jul 2018 16:05:46 -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=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=sYU5NY63; 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 S1731004AbeGWACV (ORCPT + 99 others); Sun, 22 Jul 2018 20:02:21 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:54424 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730680AbeGWACV (ORCPT ); Sun, 22 Jul 2018 20:02:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JxqFiJdr/t+pjO9xAB6kGCMldCcA3PpmAXCTmdxlT/4=; b=sYU5NY639LpH8beZlL3MTuW+J 0A77tUNqzyRwLJ54IMt9YbnhuYnzy3I3lFBG9u4UZz1/4L33kKl8j8o+zzfxcALqC15+zo9AktR5h 9/P087Bhu/2ng8dWCMUKH73f70Kc25rtRHFxgOzQgGIBf83DTwvoPJPEJOd+wE9KtQddpS27hKLsa Ghsyi6/Kd1ELK46rdQo67b0LNp+3Diduaw/Pv+eQtC7lI5btLcYjrFpspZqXPKiGWJIn3sVOud/os el/35pm5DTvfkFOaBttWxqN1fRWKUw4yiSJJLaVYAQIGIy2W4tXbm8Pbhgbzra/aZyfysAFs8lODl k7MuuGfFw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhNOS-0003If-Iu; Sun, 22 Jul 2018 23:04:00 +0000 To: LKML , Richard Kuo , linux-hexagon@vger.kernel.org, Geert Uytterhoeven From: Randy Dunlap Subject: [PATCH v2] hexagon: modify ffs() and fls() to return int Message-ID: Date: Sun, 22 Jul 2018 16:03:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap Building drivers/mtd/nand/raw/nandsim.c on arch/hexagon/ produces a printk format build warning. This is due to hexagon's ffs() being coded as returning long instead of int. Fix the printk format warning by changing all of hexagon's ffs() and fls() functions to return int instead of long. The variables that they return are already int instead of long. This return type matches the return type in . ../drivers/mtd/nand/raw/nandsim.c: In function 'init_nandsim': ../drivers/mtd/nand/raw/nandsim.c:760:2: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long int' [-Wformat] There are no ffs() or fls() allmodconfig build errors after making this change. Signed-off-by: Randy Dunlap Cc: Richard Kuo Cc: linux-hexagon@vger.kernel.org Cc: Geert Uytterhoeven --- v2: add hexagon contacts, drop erroneous sh contacts; [thanks, Geert] only change return type for ffs() and fls() [thanks, Geert] [drop the changes for ffz(), __ffs(), and __fls()] arch/hexagon/include/asm/bitops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20180717.orig/arch/hexagon/include/asm/bitops.h +++ linux-next-20180717/arch/hexagon/include/asm/bitops.h @@ -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;