From patchwork Wed Aug 29 07:57:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579627 X-Patchwork-Delegate: agross@codeaurora.org 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 AA83B5A4 for ; Wed, 29 Aug 2018 07:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FAB329231 for ; Wed, 29 Aug 2018 07:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93C162A9E6; Wed, 29 Aug 2018 07:57:35 +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 9A97129231 for ; Wed, 29 Aug 2018 07:57:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727595AbeH2LxI (ORCPT ); Wed, 29 Aug 2018 07:53:08 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35656 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727312AbeH2LxH (ORCPT ); Wed, 29 Aug 2018 07:53:07 -0400 Received: by mail-lj1-f195.google.com with SMTP id p10-v6so3593299ljg.2 for ; Wed, 29 Aug 2018 00:57:29 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=h90+3ReY06e+iLNerRK9K1XsVHAVsoADC481ssK4+Co=; b=eMaZZlIi8Tdxk3NSYyzVxvx4iPYAHUvG6b1xPMfFl7xEzxc2ZRSfF7b9YEHlObQySL 6F38glQYuSH4W6Dr7+4w7c2K1st2PnG8ZfSbxUaEmHGg4N03rW4odmmHYmRaHW3Q8eZA ZNE0IL9va18UVzPrOdFV0AjQaro1ey8aijFA4= 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=h90+3ReY06e+iLNerRK9K1XsVHAVsoADC481ssK4+Co=; b=ZLdBgoATEok9H7fbfx2+vpym+cLce0QktQZnwqkhypqSDwS6wW8LsAWD2wQ8eQ4iCW XvjwKyf6nvQmDJSjpYa+86dM50YGj/E55ZbDgWUx0TTKDeoqk/Tygjd5MYAdn6ykeZ1r ixUSWNu8+b+R+5HM1Gam309ZhFLd3HfEDTavI+1u4/uHvbZT4oiovofkTk62E+xG/iSC DcyyhC+RidLk8dg/thLicd/G7HPpbBu8ojYTfKGsOnj42uJh68I6kp7TWJRUrwg0rW/K MPfAfHSO+cGgW/KxsaxpOYxrDPsTcf0JN0YJKQF3lV9xZKbP96qyI5hyZYbjmQ+uKyAG DqLA== X-Gm-Message-State: APzg51Ah4PehdN6bTLPH5KW9Ww4SKTgaIHbGvh3YbqXhML71WLqWVoA/ InquoV+5z6dORk1d60vjY78XjA== X-Google-Smtp-Source: ANB0VdYtsunW633RCaAnIxDP+s/JGrSkHigIiOqDLDozTOzLMsyyUwkLuy1zafLGAKH4dXuhPSXv8Q== X-Received: by 2002:a2e:9095:: with SMTP id l21-v6mr3623796ljg.15.1535529448741; Wed, 29 Aug 2018 00:57:28 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id u19-v6sm596232lje.51.2018.08.29.00.57.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:57:28 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/9] soc: qcom: smem: Add missing include of sizes.h Date: Wed, 29 Aug 2018 09:57:15 +0200 Message-Id: <20180829075724.9095-2-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 Add missing include of sizes.h. drivers/soc/qcom/smem.c: In function ‘qcom_smem_get_ptable’: drivers/soc/qcom/smem.c:666:64: error: ‘SZ_4K’ undeclared ptable = smem->regions[0].virt_base + smem->regions[0].size - SZ_4K; ^~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul --- drivers/soc/qcom/smem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index bf4bd71ab53f..b77573eed596 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include From patchwork Wed Aug 29 07:57:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579629 X-Patchwork-Delegate: agross@codeaurora.org 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 CC31F5A4 for ; Wed, 29 Aug 2018 07:57:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C02C729231 for ; Wed, 29 Aug 2018 07:57:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B33EB2A9E6; Wed, 29 Aug 2018 07:57:38 +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 68C6A29231 for ; Wed, 29 Aug 2018 07:57:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727875AbeH2LxJ (ORCPT ); Wed, 29 Aug 2018 07:53:09 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38764 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727072AbeH2LxI (ORCPT ); Wed, 29 Aug 2018 07:53:08 -0400 Received: by mail-lf1-f66.google.com with SMTP id i7-v6so3525406lfh.5 for ; Wed, 29 Aug 2018 00:57: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=me8/a8IQyU0522obqv5m6glMpeNSmc8yqidyogcAdvg=; b=Mq0Ewk/k9dvIWJCv70o4LxMdJBhP8q3S9j7CnrrXiROMkWok71hmVXr1JNITV/ba4Q ooKUcuDLW/1lQ/nSYybGtGvNC+yC8Sqf0B14Xj3KYg0KHxhhpEzDrOhEEpz1FIaeG6uK nerGN1WPXhS9RCVtJh5i9PKQpEFLY1z/JaYtg= 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=me8/a8IQyU0522obqv5m6glMpeNSmc8yqidyogcAdvg=; b=qfV7KVHFchKQ2nmbqXVsE/U+3bsMg47e/bwSR0vR9FHDlonN2QHAbSwj5L2i/xfv+6 tfNsgpVgP25tRnOuQ7YKP09RZ384j4LeS5g17zqLd7C1xwlYloSL0ukzMzo5B9frsHgH zGWrqREs93mXCOS5TM/q86Ms4HzdPY1yz77DGFpvPpMuTOFNi7hyriSGISFvU4/i2eFq 8YxIDJweeOYlKmbqlpolBcYCzH16lx3ereGchifdvcU/9FOkTC8wKP2SvlY/ik54LD8H g9KB5sY/9LsxfnYUvHtBxhu//rB/RK9Tnlga7xTsXtxsJ0lcPa/Eiak+UeQn2Pobx7SA zc/A== X-Gm-Message-State: APzg51ATQvkgiaaQ8CBNZhHtFZmtKtz05f/94336i3alVKu7SOlSnuG5 tswXpoZWFYmfoqGvqMx/45MivQ== X-Google-Smtp-Source: ANB0VdZ8QTcFr7BFaUR/ArD8yzwAOuNp4d77mFxx4KunAFpRR+NgkOW2ZJyQBVwzeH/deIZZ45ArlA== X-Received: by 2002:a19:4a09:: with SMTP id x9-v6mr3598774lfa.80.1535529450033; Wed, 29 Aug 2018 00:57:30 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id u19-v6sm596232lje.51.2018.08.29.00.57.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:57:29 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/9] soc: qcom: llcc-slice: Add missing include of sizes.h Date: Wed, 29 Aug 2018 09:57:16 +0200 Message-Id: <20180829075724.9095-3-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 Add missing include of sizes.h. drivers/soc/qcom/llcc-slice.c: In function ‘llcc_update_act_ctrl’: drivers/soc/qcom/llcc-slice.c:41:44: error: ‘SZ_4K’ undeclared #define LLCC_TRP_ACT_CTRLn(n) (n * SZ_4K) ^~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul --- drivers/soc/qcom/llcc-slice.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/llcc-slice.c b/drivers/soc/qcom/llcc-slice.c index 54063a31132f..344dc2daf431 100644 --- a/drivers/soc/qcom/llcc-slice.c +++ b/drivers/soc/qcom/llcc-slice.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include From patchwork Wed Aug 29 07:57:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579631 X-Patchwork-Delegate: agross@codeaurora.org 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 1A7565A4 for ; Wed, 29 Aug 2018 07:57:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A7E429231 for ; Wed, 29 Aug 2018 07:57:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F08722A9E6; Wed, 29 Aug 2018 07:57:48 +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 8D14029231 for ; Wed, 29 Aug 2018 07:57:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbeH2LxY (ORCPT ); Wed, 29 Aug 2018 07:53:24 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:46115 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727236AbeH2LxY (ORCPT ); Wed, 29 Aug 2018 07:53:24 -0400 Received: by mail-lf1-f65.google.com with SMTP id e23-v6so3499117lfc.13 for ; Wed, 29 Aug 2018 00:57:46 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=qtQHnawV6159KrNcAB+r9rRijDPcx3eyatNOzc6jgxU=; b=hD7jWFvKOXG2bg6p3bUZsSm22Yihut5Ra1DrW+Y7vyZhxq4N3kKO96yEZdxK6TSlEY srg4ndvygCf5Aqt6V8oKmBaDZeBC/3rfcVeAL/haKDrLwgw8jUvbnCE+3171rdva2bAU uE4ZgU0p/s/1cGu6OwPOCSXnbh/dh5ZYZKccQ= 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=qtQHnawV6159KrNcAB+r9rRijDPcx3eyatNOzc6jgxU=; b=lXs9kuOeZn0Jy7931dv9ncYfeZEebY5jIucPHkNsxaswstubUiS1Led+ICYr/Q5p2c 9i0SofC7FU8z3x+uvLx0of8QSH4+tzIGx+z0335hIb9PgaLhSD4ACBCUUcPe08yvmVwa +15iqLjcgyRca8g17fjhFg/el7IJPaj0DIu9c09NmMTSzHJVWsrftowNnJ5UsJaq85u8 LYbL+zXpGgEKdGDgBGuL0fv8laG+9p/4rUVPTa73Zyb/jJGmX4iFHVKc2fJBkTzyLvaM 7MKVpsvCq7m6D8Kdwj4R/E24XIUPPrkcytqzGowWgqII1Xnr5OP6evLorX3hhjlB+Uk5 PQeQ== X-Gm-Message-State: APzg51CNS9CmR8dfHKcb+v1PK9ih/ZfmTeEds6EZ02WZ22CQy2fa+/7L VQo05YxF/Z01vjv8kufcGBPDhA== X-Google-Smtp-Source: ANB0VdahFnvJuUI3wrX3IZx42IEDtoTH6ig2CFHHf7SyegtCgnjv4ambSYIadUVnxRRyNzfSsizRtg== X-Received: by 2002:a19:eb10:: with SMTP id j16-v6mr3623820lfh.23.1535529465847; Wed, 29 Aug 2018 00:57:45 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id f7-v6sm613386lfc.4.2018.08.29.00.57.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:57:45 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 3/9] soc: qcom: smp2p: Add select IRQ_DOMAIN Date: Wed, 29 Aug 2018 09:57:17 +0200 Message-Id: <20180829075724.9095-4-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 Since we are using irq_domain_add_linear(), add a select on IRQ_DOMAIN. This is needed in order to be able to remove the depends on ARCH_QCOM. drivers/soc/qcom/smp2p.c: In function ‘qcom_smp2p_inbound_entry’: drivers/soc/qcom/smp2p.c:317:18: error: implicit declaration of function ‘irq_domain_add_linear’ entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul --- drivers/soc/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index ba79b609aca2..6e063202ad0b 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -134,6 +134,7 @@ config QCOM_SMP2P depends on MAILBOX depends on QCOM_SMEM select QCOM_SMEM_STATE + select IRQ_DOMAIN help Say yes here to support the Qualcomm Shared Memory Point to Point protocol. From patchwork Wed Aug 29 07:57:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579633 X-Patchwork-Delegate: agross@codeaurora.org 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 8E1385A4 for ; Wed, 29 Aug 2018 07:57:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8122C29231 for ; Wed, 29 Aug 2018 07:57:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7580A2A9E6; Wed, 29 Aug 2018 07:57:51 +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 29A0829231 for ; Wed, 29 Aug 2018 07:57:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727962AbeH2Lx0 (ORCPT ); Wed, 29 Aug 2018 07:53:26 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:40778 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727286AbeH2LxZ (ORCPT ); Wed, 29 Aug 2018 07:53:25 -0400 Received: by mail-lf1-f66.google.com with SMTP id x26-v6so3520195lfi.7 for ; Wed, 29 Aug 2018 00:57:47 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=IW7gPFbp3Cs/xxYQ78q60NQhn2rxDLB3vVZCg9hJpfg=; b=kg/F2SZML7WBuqEBtFfwjdEToBm5pPLV9BztrAqylqmdk3608H21CbMLwoQecSARRo 3g9Ru/ZUloD71YYuEuRhftTZN+/h8RBxWmYpgHqhZEfFkMkwUPrA2BbmfkkTTY8nKvtS 9vFEHLKzSKFtI8XRgSWvs94KKe4zgxGHZe4Mg= 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=IW7gPFbp3Cs/xxYQ78q60NQhn2rxDLB3vVZCg9hJpfg=; b=kH0vZ6BeZPfC3+KSeZh8FJZ8M6eiHzcJlfqCC4UibcFMu6vmZC500BadPNvvQ47BGW A0OvnvBtCJLey3kAm2QkSU/YMxtImhzKVF4uEsn5Gi+EMdiC3x/enV45w4ubBotT7b5J hLLw7CelE3pATafxtIW56fO3NA+r00KSs0knAFCbaPXJrs4fb6IGpgiLJ9RjzHur6Mtj ZKaJ4FO9B+Pufmk+JVYZyjcObxliPWTNkHi4ngW8Z38Z26kH46JPOQ0MbCQRGEbfCQPu 2j7Xu537vL93gsCMNu7oEaYKc0EEk4AsD/HXz+Y1jBXWrDYpEbKc933WYT0Eoi6n1MFN 7fXw== X-Gm-Message-State: APzg51A41uUQA7wWJsNo61uZu7CewzzTmQlXhiVg48kY42KY/QwkQ5cb yD6hBZ12YhiQKnWY0mxhqixmFQ== X-Google-Smtp-Source: ANB0VdZ/cC6W4Xp+66vbp5HVH71U0+p4B3AeO9k3CxVSckczb+XCafn9/5rGGxQHKSgwKdILIYg4TQ== X-Received: by 2002:a19:6d12:: with SMTP id i18-v6mr3370552lfc.72.1535529467079; Wed, 29 Aug 2018 00:57:47 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id f7-v6sm613386lfc.4.2018.08.29.00.57.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:57:46 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 4/9] soc: qcom: smsm: Add select IRQ_DOMAIN Date: Wed, 29 Aug 2018 09:57:18 +0200 Message-Id: <20180829075724.9095-5-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 Since we are using irq_domain_add_linear(), add a select on IRQ_DOMAIN. This is needed in order to be able to remove the depends on ARCH_QCOM. drivers/soc/qcom/smsm.c: In function ‘smsm_inbound_entry’: drivers/soc/qcom/smsm.c:411:18: error: implicit declaration of function ‘irq_domain_add_linear’ entry->domain = irq_domain_add_linear(node, 32, &smsm_irq_ops, entry); ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul --- drivers/soc/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 6e063202ad0b..7da6e67c7ea1 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -143,6 +143,7 @@ config QCOM_SMSM tristate "Qualcomm Shared Memory State Machine" depends on QCOM_SMEM select QCOM_SMEM_STATE + select IRQ_DOMAIN help Say yes here to support the Qualcomm Shared Memory State Machine. The state machine is represented by bits in shared memory. From patchwork Wed Aug 29 07:57:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579635 X-Patchwork-Delegate: agross@codeaurora.org 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 7B6A2175A for ; Wed, 29 Aug 2018 07:57:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CBB3293E9 for ; Wed, 29 Aug 2018 07:57:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CF9629187; Wed, 29 Aug 2018 07:57:54 +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 F207028760 for ; Wed, 29 Aug 2018 07:57:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727996AbeH2Lx1 (ORCPT ); Wed, 29 Aug 2018 07:53:27 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36776 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727957AbeH2Lx1 (ORCPT ); Wed, 29 Aug 2018 07:53:27 -0400 Received: by mail-lj1-f194.google.com with SMTP id v26-v6so3587896ljj.3 for ; Wed, 29 Aug 2018 00:57:49 -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:in-reply-to:references; bh=3U44mP/4tqzk7kSCJX0RAmaX14j3xW0Xy2yzquNCJRQ=; b=eu8V9hz9ES6iPGUJKMQcjeSNZfOxYOoVuEiZ8wPZUNaXTdHf1L38b3TuFuzs3EAXNr 7cghXi1vB+ODiC1UJ9tdbT+WHXcTdYDEHWmO+FQ1GS14ZjDZ2JqDWq948IABZjLFUjjK fKnLBr4UvCg5dZGpKcql2qdNPExdEljrvQab0= 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; bh=3U44mP/4tqzk7kSCJX0RAmaX14j3xW0Xy2yzquNCJRQ=; b=MttaTq8NhqJlP/gZljNhEfc8Qo1lzwMYydAbjSxXtOntBRiGA9MgVXE2225ag5DWN7 xH8YCKY+p6B6Vqf3DOHmymKvnXhUQcLivIIyam65z+cfu5pO62sMpGJhrUI/64dsQPCb gzAl5WohZegfBILkbXbsqr/WkMdYRFTyGNDYJWnwvhSWkToqom9OV57doduLKR+SA3rh hm4wCu74a1cZxY1w0lBBLeuz1QWI2gHyvmKM+MZFWHHXxagZlbIHnlVQq0lm4KxRvQWN Iogmp3LJFFgGETEWxW4yQuxkoidcXXGMfVinQq6N2UBJIviRgPVUwxRAQmLCCBFn673t HxpQ== X-Gm-Message-State: APzg51AOlBqDyxaUhvH/Zsy8wc+gkKzq5zY+pZ3ltrMsWUyHz2qkYGq9 Nps2Hb4NZwQjMcavTd4QQcBUpg== X-Google-Smtp-Source: ANB0VdZR1JlrxcNUSSbWBNVFqXtdcqpbi85NRRCXmIoFLLEIJx1xjitdNOub8DcBDHaDeMbbM7EmxQ== X-Received: by 2002:a2e:6e04:: with SMTP id j4-v6mr3553174ljc.61.1535529468214; Wed, 29 Aug 2018 00:57:48 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id f7-v6sm613386lfc.4.2018.08.29.00.57.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:57:47 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 5/9] soc: qcom: Remove bogus depends on OF from QCOM_SMD_RPM Date: Wed, 29 Aug 2018 09:57:19 +0200 Message-Id: <20180829075724.9095-6-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 QCOM_SMD_RPM builds perfectly fine without CONFIG_OF set. Remove the bogus depends on OF. Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul --- drivers/soc/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 7da6e67c7ea1..ac657164a136 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -114,7 +114,7 @@ config QCOM_SMEM config QCOM_SMD_RPM tristate "Qualcomm Resource Power Manager (RPM) over SMD" depends on ARCH_QCOM - depends on RPMSG && OF + depends on RPMSG help If you say yes to this option, support will be included for the Resource Power Manager system found in the Qualcomm 8974 based From patchwork Wed Aug 29 07:57:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579637 X-Patchwork-Delegate: agross@codeaurora.org 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 E6692175A for ; Wed, 29 Aug 2018 07:58:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB1CC2AA17 for ; Wed, 29 Aug 2018 07:58:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB0002AA1C; Wed, 29 Aug 2018 07:58:07 +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 7F40B2A941 for ; Wed, 29 Aug 2018 07:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727693AbeH2Lxn (ORCPT ); Wed, 29 Aug 2018 07:53:43 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34510 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727677AbeH2Lxm (ORCPT ); Wed, 29 Aug 2018 07:53:42 -0400 Received: by mail-lj1-f195.google.com with SMTP id f8-v6so3593916ljk.1 for ; Wed, 29 Aug 2018 00:58:04 -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:in-reply-to:references; bh=zObaoypU2uzVmbj0aozqxiQCeTZ60KpvPIYalSHTKxM=; b=i/YkCFfcC+jM4HVp+90ZuD4vJtZ0EfxuG6XIt4Ystcb49J26d2NVWaC77wVAFj7U2a FexZAs6M1LfUOEKjCumWJ+TUsDThYLmGzretMbtol+9JcX+o8VURyq6bLr2Wdh+xR41o qH7ieaNDYliin5OwconCMi2Sd16Qsw2Y2sPik= 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; bh=zObaoypU2uzVmbj0aozqxiQCeTZ60KpvPIYalSHTKxM=; b=ByTUPpwl5NIGji0lrVl+NXwVIZz1GOldf3Aga+/c9rTsNxokkHq7irTUoxtOE28Q2J CuG247k61MNiqAQOnGxnNsMYQI/L9ifw8W/VDdQ/1E31N9z2dWvDOdYUWaEw0BNDeqB5 0Tkx4IQaNk6YTDPb/Czz/z4Tmnk38AOtwJP6S+IBBtLrEMsZij0ddRFj7VPsf+5DSKYS VEEWlHlfdnnxI6CVv8ipZImKt0rq7aHnG/8yL2nA6SA5Nx71lLa2gY9ARGMiflZgk3Jt H3FFmvpGswDeuyHuWwFTNMAGVNTSwXURwUShPcWi5eB7LzH8EyaVeKiOnAo6J4FovvYi GS3w== X-Gm-Message-State: APzg51AKmwCpjOROcngTeHmNoY5/R7565wyleH4LX7SsbBcnpDZBGVKd pQ8Uco6PsghIURA4lQ3tQocyDg== X-Google-Smtp-Source: ANB0VdZEw3jRwLW5Ekbrqc8MEwf7hYqkg44UtD/oF7gAPAyq/Ar7V99XO/rn5qS42Lk4LrR2czxRXA== X-Received: by 2002:a2e:97c8:: with SMTP id m8-v6mr3726571ljj.52.1535529484035; Wed, 29 Aug 2018 00:58:04 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id j9-v6sm592303ljh.40.2018.08.29.00.58.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:58:03 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 6/9] soc: qcom: Remove depends on OF from QCOM_RPMH Date: Wed, 29 Aug 2018 09:57:20 +0200 Message-Id: <20180829075724.9095-7-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 QCOM_RPHM already selects ARM64, which always selects OF. Additionally, the rpmh driver only uses linux/of.h, which has dummy definitions for all functions, in order for code to to be able to build without CONFIG_OF set. Remove the superfluous depends on OF. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson --- drivers/soc/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index ac657164a136..cf4ece232897 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -94,7 +94,7 @@ config QCOM_RMTFS_MEM config QCOM_RPMH bool "Qualcomm RPM-Hardened (RPMH) Communication" - depends on ARCH_QCOM && ARM64 && OF || COMPILE_TEST + depends on ARCH_QCOM && ARM64 || COMPILE_TEST help Support for communication with the hardened-RPM blocks in Qualcomm Technologies Inc (QTI) SoCs. RPMH communication uses an From patchwork Wed Aug 29 07:57:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579639 X-Patchwork-Delegate: agross@codeaurora.org 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 557D35A4 for ; Wed, 29 Aug 2018 07:58:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4896C2A941 for ; Wed, 29 Aug 2018 07:58:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A5BE2AA1C; Wed, 29 Aug 2018 07:58:08 +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 D9F762A941 for ; Wed, 29 Aug 2018 07:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728039AbeH2Lxn (ORCPT ); Wed, 29 Aug 2018 07:53:43 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34322 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728023AbeH2Lxn (ORCPT ); Wed, 29 Aug 2018 07:53:43 -0400 Received: by mail-lf1-f67.google.com with SMTP id g9-v6so3533750lfh.1 for ; Wed, 29 Aug 2018 00:58:05 -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:in-reply-to:references; bh=n5N7rzo2Yz6ToBgcoJnkbL1OiPAx5DE6sy5tATHXNvo=; b=ZiPY7gA7J17PKABvvERsIGACUT9ycbQk2koUQRQauwaRddCew4S4x2tgVFCDLveVQV v2Ch4TRSQRXa/LbP1LDqpYFCPtmyRpx+27sAp02/nC2WtpJED7y5JAzd7s6poancIZf6 owWVvwdR8w15N7PTsFemdubA4Vd5eQGaUwke4= 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; bh=n5N7rzo2Yz6ToBgcoJnkbL1OiPAx5DE6sy5tATHXNvo=; b=teRx1s5TrbTphgWbxVR19jMXOdJO5+UIdIdQWCQWyka0vZgP2GsTmAR6OIbKGiEh73 7aTGaf83BwPGmguZbFAxw/o17gG6Veq0J9VmaFLl6JqWid2K4q+KZ7b2YEr1yhp1njTY +5Hbemr0bMO5Af8b6aAKmJNxv/Np7x5lSoDvnvFBqy9MJNEm217F/SjZYdeLtN4v2X/w oj+i+qSn/PBkunkplre0/uZrZGrweIJk9XrRzWVm4WQg5InQh6CanNkfhlIHyC1U4ye9 YxZDzl/ayHoJLSu1Is9Z11pi3SoVvkHB1wuZROY91/5T2VR6PkbEgG1iWyszGZti2krO zbqw== X-Gm-Message-State: APzg51CA3b2RGJh9LBWNtJZJhZ0PoUjqPNHFNZUj2vCA2Q4vzuAQt9WO 8NEYDkX9InnTxudshEZa3fwBMQ== X-Google-Smtp-Source: ANB0VdbK9tycsTbfyUwaPfZv1moWKY93ozWFXTSx9CpQQLzn8fe5WbNKOytMFCEtx+6WYBxhFqvKOw== X-Received: by 2002:a19:9355:: with SMTP id v82-v6mr3418687lfd.134.1535529485106; Wed, 29 Aug 2018 00:58:05 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id j9-v6sm592303ljh.40.2018.08.29.00.58.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:58:04 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 7/9] soc: qcom: wcnss_ctrl: Avoid string overflow Date: Wed, 29 Aug 2018 09:57:21 +0200 Message-Id: <20180829075724.9095-8-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 'chinfo.name' is used as a NUL-terminated string, but using strncpy() with the length equal to the buffer size may result in lack of the termination: drivers//soc/qcom/wcnss_ctrl.c: In function 'qcom_wcnss_open_channel': drivers//soc/qcom/wcnss_ctrl.c:284:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] strncpy(chinfo.name, name, sizeof(chinfo.name)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes it to use the safer strscpy() instead. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson --- drivers/soc/qcom/wcnss_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/wcnss_ctrl.c b/drivers/soc/qcom/wcnss_ctrl.c index df3ccb30bc2d..373400dd816d 100644 --- a/drivers/soc/qcom/wcnss_ctrl.c +++ b/drivers/soc/qcom/wcnss_ctrl.c @@ -281,7 +281,7 @@ struct rpmsg_endpoint *qcom_wcnss_open_channel(void *wcnss, const char *name, rp struct rpmsg_channel_info chinfo; struct wcnss_ctrl *_wcnss = wcnss; - strncpy(chinfo.name, name, sizeof(chinfo.name)); + strscpy(chinfo.name, name, sizeof(chinfo.name)); chinfo.src = RPMSG_ADDR_ANY; chinfo.dst = RPMSG_ADDR_ANY; From patchwork Wed Aug 29 07:57:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579641 X-Patchwork-Delegate: agross@codeaurora.org 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 981F0175A for ; Wed, 29 Aug 2018 07:58:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C8922A941 for ; Wed, 29 Aug 2018 07:58:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7ECCF2AA1C; Wed, 29 Aug 2018 07:58:10 +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 26F682A941 for ; Wed, 29 Aug 2018 07:58:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728024AbeH2Lxp (ORCPT ); Wed, 29 Aug 2018 07:53:45 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45446 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727668AbeH2Lxo (ORCPT ); Wed, 29 Aug 2018 07:53:44 -0400 Received: by mail-lf1-f67.google.com with SMTP id r4-v6so3502358lff.12 for ; Wed, 29 Aug 2018 00:58:06 -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:in-reply-to:references; bh=WGcGxBYbMR3lYiFeso6+j/q0sgMwNMyzkoeytqhrrrw=; b=WPxuH4FEJqGnE517ARbt1uzfFsPp8ytr1oMwjBDUNHNo5fmIpTQAAm9y3sI9brHI6A tdqnUm2Ed0vS+hZ9vrptewg9I8ejvYK6kQd+oAq107kuxp5OJ7qNkfC9fwYNgCNdxNoM OhtlFc4FsSCXYJ5lABPkWmE/YP03pcxk6Y4lE= 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; bh=WGcGxBYbMR3lYiFeso6+j/q0sgMwNMyzkoeytqhrrrw=; b=GqzuRc7h7Kdf3lLujdnCJ4WsHXGFTQYI0mMBi+IqA63E1eIX48gljyMYN+XeQgcnbB bKJvQuV5ekTxoNKDyagaEEkNSftAPeDUwnNquFkKibHEsZKlfVRenNIGY+rW4ZxMdDva soW5ZB4sRzh4i/I3T2qYnIj13qC0T1npgC3rplgo9m/cGpDnIk2v/NIT0saUQT5PndTC vIRqBQiS2L9uR7VYvs7c2nUreAsOlxFv1nWl654XZDBr4g4qdzB+NSF12Y+SQsbmPUt1 /CYuf1RqYXlSdEunTqVy/4vnEDMitG8mm7pnhXe0RIP/Qmd2UbN3xm3FSnp5+8N4hq+2 eDkg== X-Gm-Message-State: APzg51Bm4Ac0meTEX9N+M7Mhh5NMNDBtI0HXTgk+gNbBS8GAWYA1xvca ZJWCWXR/oDekxHWEp7KDsCM8qw== X-Google-Smtp-Source: ANB0VdbbFl2j18WiFp8S5cwsXkWO0k5xxDWzgqly5jEGGRu/P+vPtVIar2mp9pEp9FccfyJyHbn3fg== X-Received: by 2002:a19:be55:: with SMTP id o82-v6mr3353559lff.58.1535529486221; Wed, 29 Aug 2018 00:58:06 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id j9-v6sm592303ljh.40.2018.08.29.00.58.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:58:05 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 8/9] soc: qcom: apr: Avoid string overflow Date: Wed, 29 Aug 2018 09:57:22 +0200 Message-Id: <20180829075724.9095-9-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 'adev->name' is used as a NUL-terminated string, but using strncpy() with the length equal to the buffer size may result in lack of the termination: In function 'apr_add_device', inlined from 'of_register_apr_devices' at drivers//soc/qcom/apr.c:264:7, inlined from 'apr_probe' at drivers//soc/qcom/apr.c:290:2: drivers//soc/qcom/apr.c:222:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] strncpy(adev->name, np->name, APR_NAME_SIZE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This changes it to use the safer strscpy() instead. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson --- drivers/soc/qcom/apr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c index 57af8a537332..ee9197f5aae9 100644 --- a/drivers/soc/qcom/apr.c +++ b/drivers/soc/qcom/apr.c @@ -219,9 +219,9 @@ static int apr_add_device(struct device *dev, struct device_node *np, adev->domain_id = id->domain_id; adev->version = id->svc_version; if (np) - strncpy(adev->name, np->name, APR_NAME_SIZE); + strscpy(adev->name, np->name, APR_NAME_SIZE); else - strncpy(adev->name, id->name, APR_NAME_SIZE); + strscpy(adev->name, id->name, APR_NAME_SIZE); dev_set_name(&adev->dev, "aprsvc:%s:%x:%x", adev->name, id->domain_id, id->svc_id); From patchwork Wed Aug 29 07:57:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10579643 X-Patchwork-Delegate: agross@codeaurora.org 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 D0D185A4 for ; Wed, 29 Aug 2018 07:58:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C495F2AA47 for ; Wed, 29 Aug 2018 07:58:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B75DA2AA4A; Wed, 29 Aug 2018 07:58:31 +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 506312AA47 for ; Wed, 29 Aug 2018 07:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727708AbeH2LyB (ORCPT ); Wed, 29 Aug 2018 07:54:01 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:33135 "EHLO mail-lf1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727685AbeH2LyB (ORCPT ); Wed, 29 Aug 2018 07:54:01 -0400 Received: by mail-lf1-f51.google.com with SMTP id m26-v6so3530361lfb.0 for ; Wed, 29 Aug 2018 00:58:22 -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:in-reply-to:references; bh=RPmzBAaCwGcvI/sAuYQ1Clo4rSi6tAkAe6FRcMV4N8Q=; b=HW5/fEmgKIUafjeUg4zbJPEGYLu/s0WsK6ytwflfgvJ9MHT7krbYvZXp1jujKnYoGf 7CKQ21h+087UWapk0Wg2LFKg4us//HMcr0pPT1KBMoueiYdGndgsCQKOg2tlWWv4MyII Q6w5V44OtoZ7MTO5MUDKg/S2UmrcSQ0P/G5i4= 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; bh=RPmzBAaCwGcvI/sAuYQ1Clo4rSi6tAkAe6FRcMV4N8Q=; b=NBfWAIl6quo+pGKc6um+pHDkgW+q+wCEEFTLeWNFXQBTppQ8BShLUkXJY6MQl/68dB 8ANdzsd0ysW6PQ3TYO1UHmM9wjA3d0YLms/vtaYMNh/QlHU2gEJZ3b/wMgWU8eI+btnQ AOgCqUPDTdq5phuYflmKEtrnxF18GN//La2pdaxSAx5jsTNS2e8IiI57uZdzZ25bMcFk WPnot+OjzHG/4NXMKwMkWVbGeGLJh/UOsuoQ8btPd1IfRGXGC5qDJCjSLk+DXepEYGU6 Mb064EHyoQgGphzMsAI5paKz3f9d0YZbDmPF3MXD5SW3erCYIN8VB5kFYc3iJNz20zPV 8auA== X-Gm-Message-State: APzg51CNxeGewHGBavlQqRFq6Zk81iD2IB0QRH+eGMnJN+UwFGPToNwg W+hoedps50QE77PC6uLlS+oQ5Q== X-Google-Smtp-Source: ANB0Vdbz2buhBBncItmHfiZG0V5b3Guv57Xw6jIEgmomgTgk8BUH1SGFbO6kMlbywvNV2Z2Q+aSpgg== X-Received: by 2002:a19:290c:: with SMTP id p12-v6mr3374579lfp.124.1535529501784; Wed, 29 Aug 2018 00:58:21 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y16-v6sm596945lje.30.2018.08.29.00.58.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Aug 2018 00:58:21 -0700 (PDT) From: Niklas Cassel To: Andy Gross , David Brown Cc: Niklas Cassel , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 9/9] soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs Date: Wed, 29 Aug 2018 09:57:23 +0200 Message-Id: <20180829075724.9095-10-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829075724.9095-1-niklas.cassel@linaro.org> References: <20180829075724.9095-1-niklas.cassel@linaro.org> 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 Since commit cab673583d96 ("soc: Unconditionally include qcom Makefile"), we unconditionally include the soc/qcom/Makefile. This opens up the possibility to compile test the code even when building for other architectures. Allow COMPILE_TEST for all qcom SoC Kconfigs, except for two Kconfigs that depend on QCOM_SCM, since that triggers lots of build errors in qcom_scm. Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Reviewed-by: Vinod Koul Reviewed-by: Bjorn Andersson --- drivers/soc/qcom/Kconfig | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index cf4ece232897..684cb51694d1 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -33,7 +33,7 @@ config QCOM_GLINK_SSR config QCOM_GSBI tristate "QCOM General Serial Bus Interface" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST select MFD_SYSCON help Say y here to enable GSBI support. The GSBI provides control @@ -42,7 +42,7 @@ config QCOM_GSBI config QCOM_LLCC tristate "Qualcomm Technologies, Inc. LLCC driver" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST help Qualcomm Technologies, Inc. platform specific Last Level Cache Controller(LLCC) driver. This provides interfaces @@ -73,7 +73,8 @@ config QCOM_PM config QCOM_QMI_HELPERS tristate - depends on ARCH_QCOM && NET + depends on ARCH_QCOM || COMPILE_TEST + depends on NET help Helper library for handling QMI encoded messages. QMI encoded messages are used in communication between the majority of QRTR @@ -104,7 +105,7 @@ config QCOM_RPMH config QCOM_SMEM tristate "Qualcomm Shared Memory Manager (SMEM)" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST depends on HWSPINLOCK help Say y here to enable support for the Qualcomm Shared Memory Manager. @@ -113,7 +114,7 @@ config QCOM_SMEM config QCOM_SMD_RPM tristate "Qualcomm Resource Power Manager (RPM) over SMD" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST depends on RPMSG help If you say yes to this option, support will be included for the @@ -150,7 +151,7 @@ config QCOM_SMSM config QCOM_WCNSS_CTRL tristate "Qualcomm WCNSS control driver" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST depends on RPMSG help Client driver for the WCNSS_CTRL SMD channel, used to download nv @@ -158,7 +159,7 @@ config QCOM_WCNSS_CTRL config QCOM_APR tristate "Qualcomm APR Bus (Asynchronous Packet Router)" - depends on ARCH_QCOM + depends on ARCH_QCOM || COMPILE_TEST depends on RPMSG help Enable APR IPC protocol support between