From patchwork Fri May 17 21:09:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10948605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D7BD1390 for ; Fri, 17 May 2019 21:09:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EF8927CEE for ; Fri, 17 May 2019 21:09:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6330828479; Fri, 17 May 2019 21:09:44 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8307827CEE for ; Fri, 17 May 2019 21:09:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729526AbfEQVJg (ORCPT ); Fri, 17 May 2019 17:09:36 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:39319 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbfEQVJ0 (ORCPT ); Fri, 17 May 2019 17:09:26 -0400 Received: by mail-pl1-f195.google.com with SMTP id g9so3873946plm.6 for ; Fri, 17 May 2019 14:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UnBJbIYE69zMGwO8poN8IDYOmff82X6EhsKpcU8MvMQ=; b=g7LzPxyH+LvPI6gCbyuPthanjuBTT5sBDNxHjvccQvOx19AaSrjT67G+RlhKKys9oV pG/2wHM5+/l/ltgaITw9JcI1ey8st1bO9vfHyhCxg0ptne3yPEKbdVKfGao+KZKykTkA El0JtBYeLKcptdg7g8X7VPUc7vsSkbKgBQR94= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UnBJbIYE69zMGwO8poN8IDYOmff82X6EhsKpcU8MvMQ=; b=Tu+Bi5oLR1Vay2a0MbxUckDNnqGZLWXPxwLoNH8J/A1oqKsRiuUr9Vw2yhDVhzL4Qz +Ewn0C+zmkNqwJHfLtYJjVu5VFCWS5PcjU4NYwUP5U9doCGiZnVwW/2CetNfH4CBnmQz ktxqa1kKAKXV/gUhzKYLjI8qzysNpZGO4tIxIVKHG0BHsE8cmXIxnBanxVYrX7jBqsFz heYdMzwPZ+snhJILVB8q9AJwi1JxI+RgDlxRvDD80QBYpXVKMJ0AekAp5Wxc8Pb/uc4i 6MLKugkC4F0Zw5GWttSUysfL28PuF6sznwuEsqaQfvyAWeaSbXMGdOy5y1srlP0B53Vo Jqow== X-Gm-Message-State: APjAAAX6JQDlrvXJAVF4LOB90L921omTsEu/bqsgkJQYO6cFF/UmcuPp YIAwSnl/vMSwztbzaS7tq/FaHg== X-Google-Smtp-Source: APXvYqzt+2QTyd1NBsT69B9i+E7J5DJu/DXqehYKxdE+JFn0L1xTEJQGTfYwt14XNlqiLAT+fN3Ylw== X-Received: by 2002:a17:902:704c:: with SMTP id h12mr4735064plt.65.1558127365770; Fri, 17 May 2019 14:09:25 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id q142sm7890448pfc.27.2019.05.17.14.09.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2019 14:09:25 -0700 (PDT) From: Stephen Boyd To: Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ian Jackson , Julien Grall , Bjorn Andersson , Avaneesh Kumar Dwivedi Subject: [PATCH 1/3] firmware: qcom_scm: Use proper types for dma mappings Date: Fri, 17 May 2019 14:09:21 -0700 Message-Id: <20190517210923.202131-2-swboyd@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <23774.56553.445601.436491@mariner.uk.xensource.com> References: <23774.56553.445601.436491@mariner.uk.xensource.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We need to use the proper types and convert between physical addresses and dma addresses here to avoid mismatch warnings. This is especially important on systems with a different size for dma addresses and physical addresses. Otherwise, we get the following warning: drivers/firmware/qcom_scm.c: In function "qcom_scm_assign_mem": drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of "dma_alloc_coherent" from incompatible pointer type [-Werror=incompatible-pointer-types] We also fix the size argument to dma_free_coherent() because that size doesn't need to be aligned after it's already aligned on the allocation size. In fact, dma debugging expects the same arguments to be passed to both the allocation and freeing sides of the functions so changing the size is incorrect regardless. Reported-by: Ian Jackson Cc: Ian Jackson Cc: Julien Grall Cc: Bjorn Andersson Cc: Avaneesh Kumar Dwivedi Signed-off-by: Stephen Boyd --- drivers/firmware/qcom_scm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index af4eee86919d..0c63495cf269 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -449,6 +450,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, phys_addr_t mem_to_map_phys; phys_addr_t dest_phys; phys_addr_t ptr_phys; + dma_addr_t ptr_dma; size_t mem_to_map_sz; size_t dest_sz; size_t src_sz; @@ -466,9 +468,10 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, ptr_sz = ALIGN(src_sz, SZ_64) + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(dest_sz, SZ_64); - ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_phys, GFP_KERNEL); + ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_dma, GFP_KERNEL); if (!ptr) return -ENOMEM; + ptr_phys = dma_to_phys(__scm->dev, ptr_dma); /* Fill source vmid detail */ src = ptr; @@ -498,7 +501,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, ret = __qcom_scm_assign_mem(__scm->dev, mem_to_map_phys, mem_to_map_sz, ptr_phys, src_sz, dest_phys, dest_sz); - dma_free_coherent(__scm->dev, ALIGN(ptr_sz, SZ_64), ptr, ptr_phys); + dma_free_coherent(__scm->dev, ptr_sz, ptr, ptr_dma); if (ret) { dev_err(__scm->dev, "Assign memory protection call failed %d.\n", ret); From patchwork Fri May 17 21:09:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10948601 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11770912 for ; Fri, 17 May 2019 21:09:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F321728478 for ; Fri, 17 May 2019 21:09:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E275D2847D; Fri, 17 May 2019 21:09:37 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41AE628478 for ; Fri, 17 May 2019 21:09:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728384AbfEQVJg (ORCPT ); Fri, 17 May 2019 17:09:36 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43142 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729519AbfEQVJ1 (ORCPT ); Fri, 17 May 2019 17:09:27 -0400 Received: by mail-pl1-f194.google.com with SMTP id n8so3857790plp.10 for ; Fri, 17 May 2019 14:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xUs4KzX7CWJigxzrg3FXk071ARVu1l5gjrllphQPJ70=; b=fUH9ofFCLhOWE/+eplpGUDYFizPvxtNGBQtesTIFeafxTA1h0zSx7BAy8TXlukUFHA MCXO2sPQqoMoeL8/MmjyYMBlbCmfcZHqY1+LTUw+wPHwcaGe4uAgqQfx7qAekVSvrkQF dxv8g5AIVuNyhffCnDdhL+ZzQoRhkJLW5NpfQ= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xUs4KzX7CWJigxzrg3FXk071ARVu1l5gjrllphQPJ70=; b=LeHMuaXB+BxVq+hndFMKJc7Jyxt4x9fYXJeIy79vIeXrkUBqktMjAWGenbfon460Gu zb+j2RLRt1NdiPhb4heSg4yFQNj6jHdbu5dTqF1FVbQ8NraD4357WUfWGR6BCOjtt9gT lcgzWcK1HX/689pbt6c3Ps9pfPYqquUpdANvjA067nKaXUSkjUL97U9XeRvIy/oKYBCi yBksYRV+5hhT3TmiNGaHDV+1wPIIqpq/KSyliIWnfaHCVWrqlzfKw8hTI5IkZHmlzUSr NPu2AGvdfgmetYXlcSFHsLkqZPsesNrjS4Rw15mFDSAcRs0rxXu8rzQ9wx7u7gpgma0/ ibHQ== X-Gm-Message-State: APjAAAWXAHAqoNK+JeeONbCiz9FepfQAKgt1mjytGlXqs4SgT9jWbShM 7v3tHzYj173bwuSodzGvFfgz9A== X-Google-Smtp-Source: APXvYqwg+KNuNv6iQvKM/0JEY8vuqonvkPls25uezBNYAandLnYwUenBqTUhBs/2LWnxSZ9b+q1v4A== X-Received: by 2002:a17:902:442:: with SMTP id 60mr20543597ple.325.1558127366677; Fri, 17 May 2019 14:09:26 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id q142sm7890448pfc.27.2019.05.17.14.09.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2019 14:09:26 -0700 (PDT) From: Stephen Boyd To: Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ian Jackson , Julien Grall , Bjorn Andersson , Avaneesh Kumar Dwivedi Subject: [PATCH 2/3] firmware: qcom_scm: Cleanup code in qcom_scm_assign_mem() Date: Fri, 17 May 2019 14:09:22 -0700 Message-Id: <20190517210923.202131-3-swboyd@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <23774.56553.445601.436491@mariner.uk.xensource.com> References: <23774.56553.445601.436491@mariner.uk.xensource.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are some questionable coding styles in this function. It looks quite odd to deref a pointer with array indexing that only uses the first element. Also, destroying an input/output variable halfway through the function and then overwriting it on success is not clear. It's better to use a local variable and the kernel macros to step through each bit set in a bitmask and clearly show where outputs are set. Cc: Ian Jackson Cc: Julien Grall Cc: Bjorn Andersson Cc: Avaneesh Kumar Dwivedi Signed-off-by: Stephen Boyd --- drivers/firmware/qcom_scm.c | 34 ++++++++++++++++------------------ include/linux/qcom_scm.h | 9 +++++---- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 0c63495cf269..153f13f72bac 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -443,7 +443,8 @@ EXPORT_SYMBOL(qcom_scm_set_remote_state); */ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, unsigned int *srcvm, - struct qcom_scm_vmperm *newvm, int dest_cnt) + const struct qcom_scm_vmperm *newvm, + unsigned int dest_cnt) { struct qcom_scm_current_perm_info *destvm; struct qcom_scm_mem_map_info *mem_to_map; @@ -458,11 +459,10 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, int next_vm; __le32 *src; void *ptr; - int ret; - int len; - int i; + int ret, i, b; + unsigned long srcvm_bits = *srcvm; - src_sz = hweight_long(*srcvm) * sizeof(*src); + src_sz = hweight_long(srcvm_bits) * sizeof(*src); mem_to_map_sz = sizeof(*mem_to_map); dest_sz = dest_cnt * sizeof(*destvm); ptr_sz = ALIGN(src_sz, SZ_64) + ALIGN(mem_to_map_sz, SZ_64) + @@ -475,28 +475,26 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, /* Fill source vmid detail */ src = ptr; - len = hweight_long(*srcvm); - for (i = 0; i < len; i++) { - src[i] = cpu_to_le32(ffs(*srcvm) - 1); - *srcvm ^= 1 << (ffs(*srcvm) - 1); - } + i = 0; + for_each_set_bit(b, &srcvm_bits, sizeof(srcvm_bits)) + src[i++] = cpu_to_le32(b); /* Fill details of mem buff to map */ mem_to_map = ptr + ALIGN(src_sz, SZ_64); mem_to_map_phys = ptr_phys + ALIGN(src_sz, SZ_64); - mem_to_map[0].mem_addr = cpu_to_le64(mem_addr); - mem_to_map[0].mem_size = cpu_to_le64(mem_sz); + mem_to_map->mem_addr = cpu_to_le64(mem_addr); + mem_to_map->mem_size = cpu_to_le64(mem_sz); next_vm = 0; /* Fill details of next vmid detail */ destvm = ptr + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(src_sz, SZ_64); dest_phys = ptr_phys + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(src_sz, SZ_64); - for (i = 0; i < dest_cnt; i++) { - destvm[i].vmid = cpu_to_le32(newvm[i].vmid); - destvm[i].perm = cpu_to_le32(newvm[i].perm); - destvm[i].ctx = 0; - destvm[i].ctx_size = 0; - next_vm |= BIT(newvm[i].vmid); + for (i = 0; i < dest_cnt; i++, destvm++, newvm++) { + destvm->vmid = cpu_to_le32(newvm->vmid); + destvm->perm = cpu_to_le32(newvm->perm); + destvm->ctx = 0; + destvm->ctx_size = 0; + next_vm |= BIT(newvm->vmid); } ret = __qcom_scm_assign_mem(__scm->dev, mem_to_map_phys, mem_to_map_sz, diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h index d0aecc04c54b..1d406403c843 100644 --- a/include/linux/qcom_scm.h +++ b/include/linux/qcom_scm.h @@ -57,8 +57,9 @@ extern int qcom_scm_pas_mem_setup(u32 peripheral, phys_addr_t addr, extern int qcom_scm_pas_auth_and_reset(u32 peripheral); extern int qcom_scm_pas_shutdown(u32 peripheral); extern int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, - unsigned int *src, struct qcom_scm_vmperm *newvm, - int dest_cnt); + unsigned int *src, + const struct qcom_scm_vmperm *newvm, + unsigned int dest_cnt); extern void qcom_scm_cpu_power_down(u32 flags); extern u32 qcom_scm_get_version(void); extern int qcom_scm_set_remote_state(u32 state, u32 id); @@ -95,8 +96,8 @@ qcom_scm_pas_auth_and_reset(u32 peripheral) { return -ENODEV; } static inline int qcom_scm_pas_shutdown(u32 peripheral) { return -ENODEV; } static inline int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, unsigned int *src, - struct qcom_scm_vmperm *newvm, - int dest_cnt) { return -ENODEV; } + const struct qcom_scm_vmperm *newvm, + unsigned int dest_cnt) { return -ENODEV; } static inline void qcom_scm_cpu_power_down(u32 flags) {} static inline u32 qcom_scm_get_version(void) { return 0; } static inline u32 From patchwork Fri May 17 21:09:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10948603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A844D912 for ; Fri, 17 May 2019 21:09:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 991C128478 for ; Fri, 17 May 2019 21:09:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A7C128477; Fri, 17 May 2019 21:09:42 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20DB728477 for ; Fri, 17 May 2019 21:09:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729531AbfEQVJ3 (ORCPT ); Fri, 17 May 2019 17:09:29 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35201 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729521AbfEQVJ2 (ORCPT ); Fri, 17 May 2019 17:09:28 -0400 Received: by mail-pl1-f195.google.com with SMTP id g5so3886790plt.2 for ; Fri, 17 May 2019 14:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6yMhbjOdJrtk0xQ+i6AZwRL1Zy3R9rye9qItwhZgYoY=; b=S1pCUHGutY6vLzoeCG8u5Yqz3ySgTf/kdPKzMam30sIRpcZRxsjF+zlAGx/fIrTFIp c1UKcK4gDiWA9vZQFvW6iGNpJB4zv13dQ3EW4iO5pTUV0W8VgSG3ubSdD6/d6/DzUQ31 EpISSdtYpdScNDbFpu1KySJGBw2Fj5UhNbs1g= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=6yMhbjOdJrtk0xQ+i6AZwRL1Zy3R9rye9qItwhZgYoY=; b=bwSUntU/67zbMI19qXWnjYcykV6MJ17+rlnlMCoPPsVsq3IIkM6TFJDf/+Dnce4AoA GJVVCUYD48uw/ujuWM8i0Cq8wAg2Z5TWv607pJSZxlCFNWhw6j5Rjkw4ETVC5UMpsKEc L6i8JSP32jPObk6oMaXShG3fLZ/CiNa+JiHPxolQqmIKRAtgtR6ZXd9vfoz4nGiDv6fP 2xYeC0zrZkfJ9e6S6nLY6ub6cTGApUvittkvytqpham6UYiu6F7dkvtu2BV+stABXH8Q ykeI44H8F0zAzaKIfX7eH9mjNzEdsbZzxdrui3R8Syw2hDI9alcN0EPrNyRdbwqH0MZ6 yo+A== X-Gm-Message-State: APjAAAUrO3EW0DCmHX53zXWPPkMEQa3PqZmWZuxwYEle41p9p00LBv4M 00yaJY5bWGtRvh4AyHABbaW04A== X-Google-Smtp-Source: APXvYqxwpbLICdYAwGQqNce4bs0ykKfJr2vw7HkbP2gvufSFs/2dDJFK4zwTSIAgWKa7ah5VPW4rIg== X-Received: by 2002:a17:902:201:: with SMTP id 1mr14372173plc.263.1558127367509; Fri, 17 May 2019 14:09:27 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id q142sm7890448pfc.27.2019.05.17.14.09.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2019 14:09:27 -0700 (PDT) From: Stephen Boyd To: Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Ian Jackson , Julien Grall , Bjorn Andersson , Avaneesh Kumar Dwivedi Subject: [PATCH 3/3] firmware: qcom_scm: Fix some typos in docs and printks Date: Fri, 17 May 2019 14:09:23 -0700 Message-Id: <20190517210923.202131-4-swboyd@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <23774.56553.445601.436491@mariner.uk.xensource.com> References: <23774.56553.445601.436491@mariner.uk.xensource.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some words are misspelled and we put a full stop after a return value integer. Fix these things up so it doesn't look so odd. Cc: Ian Jackson Cc: Julien Grall Cc: Bjorn Andersson Cc: Avaneesh Kumar Dwivedi Signed-off-by: Stephen Boyd --- drivers/firmware/qcom_scm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 153f13f72bac..e300cc272847 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -435,11 +435,11 @@ EXPORT_SYMBOL(qcom_scm_set_remote_state); * @mem_sz: size of the region. * @srcvm: vmid for current set of owners, each set bit in * flag indicate a unique owner - * @newvm: array having new owners and corrsponding permission + * @newvm: array having new owners and corresponding permission * flags * @dest_cnt: number of owners in next set. * - * Return negative errno on failure, 0 on success, with @srcvm updated. + * Return negative errno on failure or 0 on success with @srcvm updated. */ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, unsigned int *srcvm, @@ -502,7 +502,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz, dma_free_coherent(__scm->dev, ptr_sz, ptr, ptr_dma); if (ret) { dev_err(__scm->dev, - "Assign memory protection call failed %d.\n", ret); + "Assign memory protection call failed %d\n", ret); return -EINVAL; }