Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3945453imm; Mon, 8 Oct 2018 12:06:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV60zv/7Frt2f+MBwQE/oPe2OIvEygBhzuxRtuyFMeMwcUvaoKssirkyKIeIc+iztYAh3hoJQ X-Received: by 2002:a65:5083:: with SMTP id r3-v6mr21917268pgp.355.1539025583959; Mon, 08 Oct 2018 12:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539025583; cv=none; d=google.com; s=arc-20160816; b=J0lzE2Qtmbiwrpu3eWRAcmAA0VyZmjE03TgsiAjhKkOw2peMLct32I1A6eZLGpV9CK KV8OgIPILA0GS3MZAgGJTRwrwPsfmMQMCleBV1H4PVrh95EThzLTgwTBPHmX67xghF1y ueCg4IBaApqTt72TPLxvAWUe2ub/oVylxBwUXXD5qSJvLldFSuEdyzD46+7jiSy3Zlhs K955Bpy36jSCV+PDR7H6wRzSSUNJjpkvi8Xguy/P5LvjJkMMUdCjl0F485TXhW3dytZv JhLkTnSYShAjOiEQb4uRYrF4sPncP3nJJK7syYgckGeOmKnb1DL5iBuaeUpeaL17yC4j N17A== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bxja1eNgQpJOj32cd6rF7QVr9ymuQAIBXyuXKOMCX9o=; b=fRDDvuFsJ4gbjnMwcXDX/95HZuJzDTVEc7jC4vRfd5QO0xknnlRiCdCmSE3jVYhJ6T VlUIklylT1Y8/5Ws1fAH9iCL34GtqwHMazrjxM/Q0sUNXw6NU/2DJKSyqSPbNrXzhBM3 s8iUOzPe6QDg0GkBHMWUjLtcYf7UIrwkyVGJKg5QryvK9usHgaJ+F4co+y9yxgTQQsBr 0CgMrI8u/PencscdTLIE3rxcTi9KwGhSSpbcCM4T4LTITYWPVSTuC6FloiGSwCYBparf iY0KyyAOD+dgbsxwd4Pi5OBu26QlkCfMNnaTpQZf90M88/VMGu5+vmrz+ReqPt31Y12A HOIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=F6ix7SMx; 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 r6-v6si20922983pfc.253.2018.10.08.12.06.08; Mon, 08 Oct 2018 12:06:23 -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=@kernel.org header.s=default header.b=F6ix7SMx; 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 S1730640AbeJIB5H (ORCPT + 99 others); Mon, 8 Oct 2018 21:57:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:44972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729988AbeJIB5G (ORCPT ); Mon, 8 Oct 2018 21:57:06 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE8552064A; Mon, 8 Oct 2018 18:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024241; bh=SbciK/a6GaoOoxg8FRGWCLgHTzl58nqA2LjK26E7dLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F6ix7SMxsuemz37xI34425PoKPS/dXTggGg4qnyVg7tJKB3YyzZ42H8qcR4uDaTEJ RP0tQlmU3vQASyx9n5ryn4xKqVwsLtRsjEZ3/gaejgzocY3dE+eLlFsVqwR/0lGpWX TFKye06Fpreu/gtbxVafKW6VLNe3q1rgLiz8BGJk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Richard Kuo , linux-hexagon@vger.kernel.org, Geert Uytterhoeven , Sasha Levin Subject: [PATCH 4.14 69/94] hexagon: modify ffs() and fls() to return int Date: Mon, 8 Oct 2018 20:31:50 +0200 Message-Id: <20181008175609.822386096@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175605.067676667@linuxfoundation.org> References: <20181008175605.067676667@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Randy Dunlap [ Upstream commit 5c41aaad409c097cf1ef74f2c649fed994744ef5 ] 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 Patch-mainline: linux-kernel @ 07/22/2018, 16:03 Signed-off-by: Richard Kuo Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/hexagon/include/asm/bitops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/hexagon/include/asm/bitops.h +++ b/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;