From patchwork Mon Jun 19 07:33:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 777621 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wrjQJ3Ygsz9rxl for ; Mon, 19 Jun 2017 17:33:43 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=techveda-org.20150623.gappssmtp.com header.i=@techveda-org.20150623.gappssmtp.com header.b="TaRRcc9A"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 3FF2DC21C65; Mon, 19 Jun 2017 07:33:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E56EDC21C2A; Mon, 19 Jun 2017 07:33:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9373DC21C2A; Mon, 19 Jun 2017 07:33:35 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by lists.denx.de (Postfix) with ESMTPS id B4E63C21BE5 for ; Mon, 19 Jun 2017 07:33:34 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id d5so15280896pfe.1 for ; Mon, 19 Jun 2017 00:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=techveda-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=yeb7n3Ow1rZC1cHC3ENJQIBs8h2TG2WlAt/04z3qmRk=; b=TaRRcc9A636iZVLuhF51fplsUsBo3V7E9hoViZfHBTDbytGQP3W7ZWNqK2MWzLmKSU GlWTDEtSrEhunB9eUUKs7d7G3cQyApHH4fK8hjmeeSaGAlKk45gj7BN7XmOvsDWQakNC jIvgKCzGFSzhQxNsUSocPMCl5O1QM9xmhrs6PEa4uksMXz0lYa06GiPEU/ttTspAIwZ/ u28n1hsEjHhe8+G78MaHtHWQsl+BI5ZxrASwlk02t+qAH7MavsT5s0GgpQaWLN2vJXMN +QiTkca+/RyudDXTv8zjCH5J3cLyYyD9ip91qUcjeVOQLF5/wvrqkuXu/kbrJa32qn/k gFZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yeb7n3Ow1rZC1cHC3ENJQIBs8h2TG2WlAt/04z3qmRk=; b=etW5kIzox366allCzLuVV8vPRKOUTbtiyT5qLscRNxRynIaekM4xJc+luvZJBPe9Rg f43AVdhUcS4pjOryoAzW8cI4/Kp1LbNGJ2p/rziRXBMZZmwy8cKwrG6ommzjwlmjXQPW gcprE1Y50dwtQw442BXV02I2VsS6GQAyKFpdDJDk2nb6byFmpscQNQ9qBUPmxHYXbE4F Ix53l79t+XB5KKp1UaUdAMzeyqtLuN8VuctE+r53NRPkkOGMvwCO1Ue1mULtHFVtYL/H 7hkuN6l+5QPp288bHWyiLRB6QWF8z9Nz72OGIM/N7uqnH9CAdGLRLIwkkKOtWAh22FAZ 9wlA== X-Gm-Message-State: AKS2vOzrz0gNVpO9dcaW8eHeFDY88DCC8VFKevOdwv0dj33KlC6o1Hhj bKb+iGaTADO5zjFW X-Received: by 10.99.165.66 with SMTP id r2mr4201360pgu.65.1497857612940; Mon, 19 Jun 2017 00:33:32 -0700 (PDT) Received: from localhost.localdomain ([124.123.42.5]) by smtp.gmail.com with ESMTPSA id h123sm18288063pgc.36.2017.06.19.00.33.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jun 2017 00:33:31 -0700 (PDT) From: sunil.m@techveda.org To: jh80.chung@samsung.com Date: Mon, 19 Jun 2017 13:03:18 +0530 Message-Id: <1497857598-19618-1-git-send-email-sunil.m@techveda.org> X-Mailer: git-send-email 1.9.1 Cc: u-boot@lists.denx.de, Karthik Tummala , Suniel Mahesh Subject: [U-Boot] [PATCH] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Suniel Mahesh __be32_to_cpu() accepts argument of type __be32. This patch changes type of the buffer in ALLOC_CACHE_ALIGN_BUFFER macro to __be32, which is then passed to __be32_to_cpu(). This prevents sparse build warnings. drivers/mmc/mmc.c: warning: cast to restricted __be32 Signed-off-by: Suniel Mahesh Signed-off-by: Karthik Tummala --- Note: - Build was carried out with the above changes, no build errors reported. --- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 3cdf6a4..3d4da4c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -882,8 +882,8 @@ static int sd_change_freq(struct mmc *mmc) { int err; struct mmc_cmd cmd; - ALLOC_CACHE_ALIGN_BUFFER(uint, scr, 2); - ALLOC_CACHE_ALIGN_BUFFER(uint, switch_status, 16); + ALLOC_CACHE_ALIGN_BUFFER(__be32, scr, 2); + ALLOC_CACHE_ALIGN_BUFFER(__be32, switch_status, 16); struct mmc_data data; int timeout;