Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3917868imm; Mon, 8 Oct 2018 11:39:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ZUIbBXBiG/tARnb9UStdhAIvn8DNczdvg8Nt0va5v3/PmJBnGkQh48KxW9dmvXFbdfPIj X-Received: by 2002:a65:588e:: with SMTP id d14-v6mr22117146pgu.117.1539023995440; Mon, 08 Oct 2018 11:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539023995; cv=none; d=google.com; s=arc-20160816; b=E6+wRsqdvggdc//Q3aMsGo5kRcFikyDLxFQazS1tE4Ec/oauqcK3pS6+/vhHxY/vR2 4MyzDZEN/od/a+JF40FP95sIryO97L8myRoLZei/vym4TPhJA9RXsY5f8ckhqCEHGX0/ nfHxjc45+06j7+8aM4+ctWYMD+5RgpH1M9y3aJtWjYS2ck2of2D8Owi55Y5WMkMwpiMT UvptW+RFYCiEb+DeM4P+dcg/eehlbhWXWtGolAl+OXXIxPY0WCMqeGxpGsx5XOJa6cc7 m10yR50l9A7YQFPtwooquuZG4EeJWFOSQwUZGeS8n6zMbgveQy5hKr1mJ3Qw8GthvkxU M7dw== 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=qgMNGt1tBGOxrlIu0Sg9KdetEPUvtMGXIXQ7f8Cr+hs=; b=dKEXiB/Qxv3/I/OQ6k2cqZuHFy6xH6YwoioHQR5uKOljXsqUK/alzBntu45bbWx/1S AfvpIuOy55SV2Ij8r2T8r2c6XsWDV8ZzR1imhYKpyi4RZN6N3s8AmwQ7yd/Jn2R/Ul3h J79M7+118k6mfHq7F8BTk1AUsu/JsaPxvLREm4rNjHQm8Nv3wohLLWqS8aFlyPck28sr bQb/nZsYoqafbnus5LCulaiUCaO1Am0HWeTCMzy+GrHdtymfh7CxdgDWxc9pnIG9Dpcb T2dYY957lPNkhd5tY6cDBZl/AFg5Wzg7tqRmWy3SqI2yIpMoZ2K3CjHx3ucwWZq1y9II gadQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NmsSCrjh; 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 a8-v6si18991487ple.80.2018.10.08.11.39.40; Mon, 08 Oct 2018 11:39:55 -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=NmsSCrjh; 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 S1729041AbeJIBu4 (ORCPT + 99 others); Mon, 8 Oct 2018 21:50:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:37492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726427AbeJIBuz (ORCPT ); Mon, 8 Oct 2018 21:50:55 -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 6C3F72089D; Mon, 8 Oct 2018 18:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539023872; bh=+g/umbrgp6hP2xIIgYzCC0wYAGzRnAbaS2k32awX2V8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NmsSCrjhzkT+dom1YNZwpZEiieuzTVo01YEu+LCpfSHjBzvoLtLftFvw+qNM97ACu cJQYJ2W6+mwDlVoAhC+l0pYZHXicwgWGvplu9aAhl41qEc5oQj+J4vXH4U3nVv1mQ9 3DsvgFlOU3ffWh85u3iGzmDMt3L/ZdUIebRzYgb4= 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.4 101/113] hexagon: modify ffs() and fls() to return int Date: Mon, 8 Oct 2018 20:31:42 +0200 Message-Id: <20181008175536.926591862@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175530.864641368@linuxfoundation.org> References: <20181008175530.864641368@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.4-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;