From patchwork Mon Apr 4 10:17:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 12800089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD824C433F5 for ; Mon, 4 Apr 2022 10:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4Pdq2YIB40blg1vj2wn4sWoXZzsCkiyxwvKtvwqRTIY=; b=mxrMXWP+dXxmy8 N41awn1OxDL5ux5gVwIeQwSH8u8RO/uA7DEkNAldyxpq+CI3xDCJdfkVqF2UJodDeXxsgscx15dOy Pxry2IrxsFdVy6CxUcEletFz2GJBYfSWPgdG7ZVFd1W8i4RFUC4SOCJoEq+0TlbQAVp5KEUZKev0Z XmHNqSzrwV8xfjEAT3cJHZx7kb0FaCW/7EdOr/vv7gg5t1OMP5ihxORt45noI97nBv3epkGspmy/R /StAKe7fgwnpPAnhgtZVLFec0SV95EXfUWunYSSqMywTSbIZHpw9S5L/A4GgldMLhDrTYONuyq5kN fe8NfqtWixEcoqcbMP9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbJmE-00ERhG-A7; Mon, 04 Apr 2022 10:17:38 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbJm9-00ERdI-Jx for linux-arm-kernel@lists.infradead.org; Mon, 04 Apr 2022 10:17:35 +0000 Received: by mail-wm1-x334.google.com with SMTP id q20so5595455wmq.1 for ; Mon, 04 Apr 2022 03:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=mV7mVvkcvKrPA0nn13aopStte01CanOqiAL16eKUA4c=; b=eEiQ9s7qF5YibTbUKy/MVO17ih75uJER5OLQvBIh6WkCZ2Hx/XfTfJuH1uLw0ZeP6D e6SVJ0LOkBmnnGUY93BC+YbDeYoX0jW//xcs2LH5PmK6WbU/0lPgldozbDRNUOk2ktGb f9Am9EXbBh6lRpYkH0dEh0qlcMnw4HBoC5GnHus95ryzA5rDzBf3CfSu0cT52ZCVUWax 1o4seEMxji+2rfIxG4XnBnLTc9EObblT+Tv2n9uSMmja7Ke18Td8SHlNktbx/87JB0bH XnHHezJjr0FosaYvR1iltDwd6dOxvgXuAGVMw1pk8mhVERnxZu85g7WCA3PT5jcOYEwV lmCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mV7mVvkcvKrPA0nn13aopStte01CanOqiAL16eKUA4c=; b=V27K22On3Vcp/LaB0DKuBjzIwE41GKo6KNWgVG+LJpvcl0Mt36sH/J1ElUhsh6+Kyf 9P8gWU5cb9eOCje4pyzuBaZwglrNqJ/gBs1n7PAMIXyJq4DILC2fLOJIoOYXEnQelwwu JQsjFfRxIwSW/2W1S4Oznnzb8c0zwJLNcpg+L0WkHwzo4SLP80FECcqnBALQMg1XH+qU OgrOEpixtnrCpzWvdLSC+mGtjIyzajEUSzPyWFyJS1xlx49yS62Y9tfEWbMDbaVezGrj BA+Wbq0h+KgiPvcZXeWiTvg/aNWY6LJiYWKGiT56frskSPEHXQ1ax59un+jx7Guiminy GPIQ== X-Gm-Message-State: AOAM532iLfQ2xULJlX4w2yJCv++cclgnUCZBoIsVP6kynsTCH1uR9mP7 JVS46zGctc6yEVvrRg7EHuAD3A== X-Google-Smtp-Source: ABdhPJw8n1n3hIBtLNlfwBGHTZN5ZaCMscFe3FPS7MSQV/nHtjlHlvBw+V2b52iPVvUrCGulTok9kw== X-Received: by 2002:a1c:3587:0:b0:381:50ff:cbd with SMTP id c129-20020a1c3587000000b0038150ff0cbdmr18745633wma.140.1649067449315; Mon, 04 Apr 2022 03:17:29 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([2a04:cec0:10db:48f5:91f6:e01:f00:f0cd]) by smtp.gmail.com with ESMTPSA id q17-20020adff951000000b00205c1b97ac4sm8919255wrr.20.2022.04.04.03.17.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 03:17:28 -0700 (PDT) From: Etienne Carriere To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Sudeep Holla , Cristian Marussi , Etienne Carriere Subject: [PATCH] firmware: arm_scmi: fix incorrect type in optee transport Date: Mon, 4 Apr 2022 12:17:22 +0200 Message-Id: <20220404101722.27986-1-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220404_031733_720640_17D777B7 X-CRM114-Status: GOOD ( 12.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Correct struct scmi_shared_mem references that should have __iomem attribute. The issue was reported by kernel test robot: drivers/firmware/arm_scmi/optee.c:428:20: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct scmi_shared_mem * @@ got struct scmi_shared_mem [noderef] __iomem *shmem @@ drivers/firmware/arm_scmi/optee.c:440:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct scmi_shared_mem [noderef] __iomem *shmem @@ got struct scmi_shared_mem *shmem @@ Reported-by: kernel test robot Signed-off-by: Etienne Carriere --- drivers/firmware/arm_scmi/optee.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c index 734f1eeee161..bcab9ff73103 100644 --- a/drivers/firmware/arm_scmi/optee.c +++ b/drivers/firmware/arm_scmi/optee.c @@ -405,8 +405,8 @@ static int scmi_optee_chan_free(int id, void *p, void *data) return 0; } -static struct scmi_shared_mem *get_channel_shm(struct scmi_optee_channel *chan, - struct scmi_xfer *xfer) +static struct scmi_shared_mem __iomem *get_channel_shm(struct scmi_optee_channel *chan, + struct scmi_xfer *xfer) { if (!chan) return NULL; @@ -419,7 +419,7 @@ static int scmi_optee_send_message(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) { struct scmi_optee_channel *channel = cinfo->transport_info; - struct scmi_shared_mem *shmem = get_channel_shm(channel, xfer); + struct scmi_shared_mem __iomem *shmem = get_channel_shm(channel, xfer); int ret; mutex_lock(&channel->mu); @@ -436,7 +436,7 @@ static void scmi_optee_fetch_response(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) { struct scmi_optee_channel *channel = cinfo->transport_info; - struct scmi_shared_mem *shmem = get_channel_shm(channel, xfer); + struct scmi_shared_mem __iomem *shmem = get_channel_shm(channel, xfer); shmem_fetch_response(shmem, xfer); }