From patchwork Wed Sep 2 20:48:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11751725 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C7A7722 for ; Wed, 2 Sep 2020 20:48:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FD4120BED for ; Wed, 2 Sep 2020 20:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599079738; bh=t/8BcFdSorWnivrsoG38nd1y314QH2po1FsRQi2lhnU=; h=From:To:Subject:Date:List-ID:From; b=FsVEyv7paAa7NLUKUqr9r38wB/d9TsvN00BbG1o7Yg+aMgbAwUP0z2pHb/jIeT47v XMXKIQFebG0w2+xCNZO/QTRI5uEEIIfRuS+IqstUgcWPFCKCAKZveT5433lUqIn3iv 0vpUPYgT5uuYwgP0oi3xc4vqPEzaFVoeM/pkITzw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726247AbgIBUs5 (ORCPT ); Wed, 2 Sep 2020 16:48:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:58386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgIBUs5 (ORCPT ); Wed, 2 Sep 2020 16:48:57 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22435207EA; Wed, 2 Sep 2020 20:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599079736; bh=t/8BcFdSorWnivrsoG38nd1y314QH2po1FsRQi2lhnU=; h=From:To:Subject:Date:From; b=cep2yre4au+2ROtrnWF4L3OjIjRecdkmIKyTCjCm308tuR14rW+RQ8bA+Cy4vkVTj 5/ty7o2J/UNblaLlVPOFF29MvytJ2z9w8RC7lLjQJg0VZSt8U2gfIwQS8Kjzif4YN5 JWdk9wyDqqs4VpsEQkYozAJ4zUpvzf4mXFN8NyrI= From: Krzysztof Kozlowski To: Ulf Hansson , Ben Dooks , Krzysztof Kozlowski , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] mmc: davinci: Fix -Wpointer-to-int-cast on compile test Date: Wed, 2 Sep 2020 22:48:45 +0200 Message-Id: <20200902204847.2764-1-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Store in interrupt service routine always '1' in end_command, not the value of host->cmd to fix compile test warnings on RISC-V: drivers/mmc/host/davinci_mmc.c:999:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Krzysztof Kozlowski --- Follow up to: https://lore.kernel.org/linux-arm-kernel/20200902193658.20539-1-krzk@kernel.org/T/#t drivers/mmc/host/davinci_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index fad1010fb52b..66d740ee7d45 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -996,7 +996,7 @@ static irqreturn_t mmc_davinci_irq(int irq, void *dev_id) if (qstatus & MMCST0_RSPDNE) { /* End of command phase */ - end_command = (int) host->cmd; + end_command = host->cmd ? 1 : 0; } if (end_command) From patchwork Wed Sep 2 20:48:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11751727 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6951D722 for ; Wed, 2 Sep 2020 20:49:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5086520C56 for ; Wed, 2 Sep 2020 20:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599079743; bh=/GhIFha/+TBHI6MyiiKEJbWoOQuukXfIzVKICT5nktg=; h=From:To:Subject:Date:In-Reply-To:References:List-ID:From; b=xq/c3ckMfOokMUa/fP1qoHcjtedqnP52cW2WN9d7p97vncLP8OXJVKGtlaZRivDZb 0VGUPLI1lqvs/vxmA/fhlj1q8kHINVsEy4HuCm1oBPELuvXIpTCD/e8FsT91SW9C1f AKhqwLv4nQk+ERi63lfX3psUNzpLMwGRk+XhHY0M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726479AbgIBUtC (ORCPT ); Wed, 2 Sep 2020 16:49:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:58420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgIBUtA (ORCPT ); Wed, 2 Sep 2020 16:49:00 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DD2F2083B; Wed, 2 Sep 2020 20:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599079739; bh=/GhIFha/+TBHI6MyiiKEJbWoOQuukXfIzVKICT5nktg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=co/qoHbiTAzDR0BKe7yk+ALRQGX6M9VQAT24HXHnyX6QT1AS2FLEr0iuuygtYDhth 2Y45ZWyWOqgzE+dgRyTu/qxPorUj+6vMKc/7b4qho98ADAFvt46DLoemA49Ytn0dSm tRYWNmq2GSRu5KeRe8fiu6R2gphLESuin1E9h640= From: Krzysztof Kozlowski To: Ulf Hansson , Ben Dooks , Krzysztof Kozlowski , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] mmc: s3cmci: Use proper printk format for iomem pointer Date: Wed, 2 Sep 2020 22:48:46 +0200 Message-Id: <20200902204847.2764-2-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902204847.2764-1-krzk@kernel.org> References: <20200902204847.2764-1-krzk@kernel.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org iomem pointers should be printed with pointer format to hide the actual value and fix warnings when compile testing for 64-bit architecture: drivers/mmc/host/s3cmci.c:1355:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/mmc/host/s3cmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index dcd458649338..3fb597095079 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1352,7 +1352,7 @@ static int s3cmci_state_show(struct seq_file *seq, void *v) { struct s3cmci_host *host = seq->private; - seq_printf(seq, "Register base = 0x%08x\n", (u32)host->base); + seq_printf(seq, "Register base = 0x%p\n", host->base); seq_printf(seq, "Clock rate = %ld\n", host->clk_rate); seq_printf(seq, "Prescale = %d\n", host->prescaler); seq_printf(seq, "is2440 = %d\n", host->is2440); From patchwork Wed Sep 2 20:48:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11751729 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C8ED722 for ; Wed, 2 Sep 2020 20:49:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64678207EA for ; Wed, 2 Sep 2020 20:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599079749; bh=s+F12H96PgtRNsd1OHfWDfQQChwh5OhgEc9C9LdXm9Y=; h=From:To:Subject:Date:In-Reply-To:References:List-ID:From; b=aD4oj8pLLKIhuT07SZvhgRvjyMGLwjI0UI4dDA9/HXxyYaeC6/1UhE8KNmyjJjRC4 xsQuD3sEukza1rpxZVGM44BrLvSMxM0VnjH/mz6VoFmGgg0GJCZSfrW3FX0sEGuxyz fRKDaievJkg5/22ppvxwXIwe8yaJCDGtOef543P8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726669AbgIBUtH (ORCPT ); Wed, 2 Sep 2020 16:49:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:58508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbgIBUtC (ORCPT ); Wed, 2 Sep 2020 16:49:02 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6DAC5208C7; Wed, 2 Sep 2020 20:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599079742; bh=s+F12H96PgtRNsd1OHfWDfQQChwh5OhgEc9C9LdXm9Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X5jBvMBSiU0fnDH4PWicRH3OqFscHWmjwayDx66UpI40A/o8ofDnneqY9E2Wc0NLo zDSTOqsxYqszZ5pUR8x6Sc+fK3JyQo5k0HRNxyPSYPg1RWRmzOGtiZdsotBi/zlgYy t4Qkj0Bans2B565n+00hI6Eeq/7D8qFNiC4PCGZM= From: Krzysztof Kozlowski To: Ulf Hansson , Ben Dooks , Krzysztof Kozlowski , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] mmc: s3cmci: Cast driver data through long Date: Wed, 2 Sep 2020 22:48:47 +0200 Message-Id: <20200902204847.2764-3-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902204847.2764-1-krzk@kernel.org> References: <20200902204847.2764-1-krzk@kernel.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Since driver data is a pointer, direct casting to integer causes warning when compile testing for 64-bit architecture: drivers/mmc/host/s3cmci.c:1495:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] The actual driver data can be only 0 or 1, so cast it via long and do not care about any loss of value. Signed-off-by: Krzysztof Kozlowski --- drivers/mmc/host/s3cmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 3fb597095079..ac94f926624d 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1492,7 +1492,7 @@ static int s3cmci_probe_dt(struct s3cmci_host *host) struct mmc_host *mmc = host->mmc; int ret; - host->is2440 = (int) of_device_get_match_data(&pdev->dev); + host->is2440 = (long) of_device_get_match_data(&pdev->dev); ret = mmc_of_parse(mmc); if (ret)