Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3931266imm; Mon, 8 Oct 2018 11:53:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV61iwgwIhakL0DxFRaP9S2cMJzYsZAKmzVyQKu4iK8Is9zeCoAmcmVNQd/ny27/WVZtnY4TM X-Received: by 2002:a63:608c:: with SMTP id u134-v6mr21883619pgb.266.1539024814020; Mon, 08 Oct 2018 11:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024813; cv=none; d=google.com; s=arc-20160816; b=QA4cc4xXfwEmunVvG+8s21yBJQ/2/ERlkKKYvTsfTcJ8wLJycTB4M78bh3mCXl5GFh EkbRekqF68fytUtaWcgxhNj6247yJqrbe6VQWZgjf1qvXSvXnPmDcVi56F5nqP29qvxf ILHNXcATXiccQEvJzavL1y4t7k2SExubUDivtSShsa7myaa5EZ93s5RKIRurXh2CFuT+ iJ12jL+GP9gOYsPn8946iA89HYG7vm7qhFcpwploVLvFZgWoDJO6I/CEjTjlPg19yjv4 VFQizKfMbyZ19zT/Tfr0ExueXOcQGCRzZTfeA4InG6brd6x1foINCOzC1arYHKgkj/Ks SVnA== 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=aql/zJTxYA7tDlDcosr/BAVeYLNf67TsBtZ9/7PnY8c=; b=H0onrpP9RCUg9XYA8tT/3qPYTbGraDs45nMOWLbXOmJ9WLYYeSzgXgmEJkkHVZqImP 8M6TL+L/CRS1bke+4OkS3mgDSK+s2Cj9n+Dz91ZL+udG/IOh5lZn3sS1N4DjGD57MQ1S sjxxCCQlatyFZihwkrOc4QdlZNKUdjoXXwbDUnaHClLYN8AnNPgrjKkSnLF0Nmi85UXe FkVAsecWM1DW/RS4UN4WyXfRxMPLcUtIfyNSvunyzDLHx54Yu6nps+B7D2G+zCNUDP55 LFvR8qiyN90rQRbIVvWFWBSg/pPNFyYuTMHkQHvccN24fqMHL6p3+mQATCYxIqCcv30q 58Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eg5tfbZ+; 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 o2-v6si16990616pgj.111.2018.10.08.11.53.18; Mon, 08 Oct 2018 11:53:33 -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=eg5tfbZ+; 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 S1732445AbeJICFI (ORCPT + 99 others); Mon, 8 Oct 2018 22:05:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:55160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730284AbeJICFH (ORCPT ); Mon, 8 Oct 2018 22:05:07 -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 CC8C4204FD; Mon, 8 Oct 2018 18:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024719; bh=HugO99h+ucY89j7BY6k0Aq21TF/cW22G7TJRJRE9ghQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eg5tfbZ+lkv160yu9NT9UbPhtESKA5an5Lviupa6TuCQFA+G+QxqtUU8PD2PRp/46 cr+LXnLxLN8FypZANV2DYCpsEP46LF9YijJ6qilmEoiQ1xj5PmDXMUEktAiqFIafgi Zpobw8V33s3GTAV/Xi1KtfG+ogPic7gMfYzPSklk= 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.18 131/168] hexagon: modify ffs() and fls() to return int Date: Mon, 8 Oct 2018 20:31:51 +0200 Message-Id: <20181008175625.026413127@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@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.18-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;