From patchwork Wed Apr 25 22:53:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10364349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C9E26038F for ; Wed, 25 Apr 2018 22:54:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D34628F9B for ; Wed, 25 Apr 2018 22:54:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FFD428FBB; Wed, 25 Apr 2018 22:54:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4294C28F9B for ; Wed, 25 Apr 2018 22:54:17 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1DDCE2677A0; Thu, 26 Apr 2018 00:54:16 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 411302677B9; Thu, 26 Apr 2018 00:54:14 +0200 (CEST) Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by alsa0.perex.cz (Postfix) with ESMTP id 79D29267766 for ; Thu, 26 Apr 2018 00:54:09 +0200 (CEST) Received: by mail-qt0-f195.google.com with SMTP id q13-v6so29068592qtl.3 for ; Wed, 25 Apr 2018 15:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ErWlyV3RxWsFO13EAdDIg1SZ/+r/q+j+43U1JnQcvjA=; b=fsjNw08l6+FPWbIzJDyUBWreaNZrWkpbuTKrBugYp/S6+7h5cl6mtt+SPWvcu2ccbO on/lMC1Hpj3Fs7+CXCsPqvDwEL88GJStfIBhkNmDVGjKIvt2PLIpahuofpjbCB6kYALw 0DyMiXBjZaHXfiynBef+4IIgwrd518iwF5/1OAAEkyA2pz3pczPuFj4N4rBrZhyh4Q5q kh1vSI6+iu+KzYV1iYv64TBuREFN5OZHYrqkh4Vfu+VvwXjKQ6MIriTs1ax0K5/Evbu6 8hK6fSDSKSsQ3x+r09hN2gDt2pKXpEXkLYetdZAyh6cFuJopnglt56U6+Q4DO1UH7LXl EWRA== 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=ErWlyV3RxWsFO13EAdDIg1SZ/+r/q+j+43U1JnQcvjA=; b=ZN6ZwVGcU/odP785INtU3dJx6Ecj0pRSyJe1elkibFEXRwQ+YQaPeqJr1lSW3p0iOr VQeEwnhx754zz0xd9Ep+62ZeIpiXCeqCaGv58EEEV0guk1vC1OmJjco8Ak7p6brxqOYB fOxVMC8FG9NruuTJQy/nmcTfcLvxPTGutU9SCuYc1PMah5mSr0sg64myjTde7Lqe9LJL IU20C0Ioc6r8AQWjOjmWAo7HOlQTWsLDKzBFOyNkFucKp605HhtubtJhq5s84yAwMszj xzvlYGbp5RQZvQl2l43rNqiz4NEXEAwl/bDYidn79AbSD5qZd87ZBE+KTLfyl+nii2Dt 9PvA== X-Gm-Message-State: ALQs6tBxOdQoCgMNGlvp/4SIWBPGyeoKKiQ8ccN6X24ZHZ6G9sfEKMRA XVCAgpgA+TajRa73Atvb+Rjm9w== X-Google-Smtp-Source: AB8JxZosDVWW1kAWNW3/VuaxwBetGL+LW9sVS6Hi/PQ1WJNN8Wj95M9NwyFTZdUubeCrwT3hKWCs0Q== X-Received: by 2002:ac8:2ac2:: with SMTP id c2-v6mr26039137qta.147.1524696848992; Wed, 25 Apr 2018 15:54:08 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:ab6:702e:77f9:8a25:e710]) by smtp.gmail.com with ESMTPSA id g12-v6sm13722002qtj.42.2018.04.25.15.54.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Apr 2018 15:54:08 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 25 Apr 2018 19:53:52 -0300 Message-Id: <1524696832-7684-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: nicoleotsuka@gmail.com, Fabio Estevam , alsa-devel@alsa-project.org, timur@tabi.org Subject: [alsa-devel] [PATCH] ASoC: fsl_ssi: Use u32 variable type when using regmap_read() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Convert the sisr and sisr2 variable types to u32 to avoid the following sparse warnings: sound/soc/fsl/fsl_ssi.c:391:42: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_ssi.c:391:42: expected unsigned int *val sound/soc/fsl/fsl_ssi.c:391:42: got restricted __be32 * sound/soc/fsl/fsl_ssi.c:393:17: warning: restricted __be32 degrades to integer sound/soc/fsl/fsl_ssi.c:393:15: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_ssi.c:393:15: expected restricted __be32 [usertype] sisr2 sound/soc/fsl/fsl_ssi.c:393:15: got unsigned int sound/soc/fsl/fsl_ssi.c:396:50: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_ssi.c:396:50: expected unsigned int [unsigned] val sound/soc/fsl/fsl_ssi.c:396:50: got restricted __be32 [usertype] sisr2 sound/soc/fsl/fsl_ssi.c:398:42: warning: incorrect type in argument 2 (different base types) sound/soc/fsl/fsl_ssi.c:398:42: expected unsigned int [unsigned] [usertype] sisr sound/soc/fsl/fsl_ssi.c:398:42: got restricted __be32 [addressable] [usertype] sisr In other places where regmap_read() is used a u32 variable is passed to store the register read value, so do the same here as well. regmap API already takes care of endianness, so the usage of u32 is safe. Signed-off-by: Fabio Estevam --- sound/soc/fsl/fsl_ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 89df2d9..1544166 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -385,8 +385,7 @@ static irqreturn_t fsl_ssi_isr(int irq, void *dev_id) { struct fsl_ssi *ssi = dev_id; struct regmap *regs = ssi->regs; - __be32 sisr; - __be32 sisr2; + u32 sisr, sisr2; regmap_read(regs, REG_SSI_SISR, &sisr);