From patchwork Mon Nov 12 12:25:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 150824 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3081213ljp; Mon, 12 Nov 2018 04:27:36 -0800 (PST) X-Google-Smtp-Source: AJdET5d6RJKCLg+N9277p6mlUgytJcE2ZSz76udGJdrjNlVde1KgQu6zAJ4OWH0iChFLkOe6ijmS X-Received: by 2002:a63:8441:: with SMTP id k62mr650171pgd.392.1542025656318; Mon, 12 Nov 2018 04:27:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542025656; cv=none; d=google.com; s=arc-20160816; b=XLj38OD6LJngt3D5m0OEpckeJsTujw2mnkKglyqtqND/DprueaiY8I1NTU4YsDzzHe K35o27FAI2zMtG8XpYs9laA7zgvaqo1J3Lx87WhHDX8t/QVONKGzqDw4/U8ucWExhbPk rFeAUV0WUUEEKrq+ViNXKpJ6jihlcBsEWmoPpqs6AG0gt6uSSkDS7x9dZIlah9s/w3ho P122+d57NRuNU6IPuWFy0TTzig2S1t6eAa7w7JMcS9vDcW/SLUnnhzv7uOItEr1AxvUw qM/IrCVxMApfZ5Wf1Shi3Q1nHHK/VXpQZDzgBEi4WvhhSmgVQYZaCSNm2pYIEfhZChuO cIwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ODYGFMdaycbKq0Th7g4PJEwwAYXx0ZmPhdkLx8Ug4NM=; b=rSuArIDTzoaENF49W/cylRjOtc68fHD8xVN7vsLrSL0LlRHVvqPOxLK7JRZDjFuaWu Mg+UCafW1+/sFZQMipp2EXLCJA7KtFUIdNwXUquJgVuVUWRYQjyaqrw68175potpqul1 b1g0otyboX2l9LnOSnJqT8Br96Y6NmpoGi62bBy08GghQiUOyYz+bDDl50FWxS8lIV0R ttbwbbz4v2iu7arK89UWDT49UyDyHd3JyNFx2bseb8ylzVRy1sFfctq2lc+kI3+wDgZh NBagQ1Mbuh/CkmCeIVT8myxZPkbHdSJUP2liUr1b3IW96mI+BHrPOAAVXxLd7KSDSc+O sSJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iCb1S1vp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si16561267pgn.553.2018.11.12.04.27.35; Mon, 12 Nov 2018 04:27:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iCb1S1vp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729552AbeKLWUg (ORCPT + 32 others); Mon, 12 Nov 2018 17:20:36 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:39961 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729246AbeKLWUg (ORCPT ); Mon, 12 Nov 2018 17:20:36 -0500 Received: by mail-ed1-f68.google.com with SMTP id d3so6622211edx.7 for ; Mon, 12 Nov 2018 04:27:31 -0800 (PST) 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=ODYGFMdaycbKq0Th7g4PJEwwAYXx0ZmPhdkLx8Ug4NM=; b=iCb1S1vpH3DX0wnOqjR5CJ/8DFkbsdrzt1AWnyffajjseN2SMITZouYiSNVAHWwrlK dmoynyr1dyy2YRG1moxZAVAMbxvrcDauOhMGj7snCjo8w1AjYZI3eIxDDxZE5RPxttVn pX5aaTYAAbvZGDsMmKJ7yy5Vi4DPKY+eMGYvo= 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=ODYGFMdaycbKq0Th7g4PJEwwAYXx0ZmPhdkLx8Ug4NM=; b=LNTcU8/s4jNw+pOa2KN9zfJj8Hx6IEuDk/67h4iWUuX6z/vWQJnHfuzffqz0kVEWTW NeRXxUqK8irvvXrY8adOJLKrVS51WUzLHTtKKz4QczOjYdDrwKaDj2hDhXk8N8HDGfiG H7ugevhEHvhRGrxxH2vk3zDVQnEZ5A5EcIIUfHS7bSdtApChbfsDKNfHuqxFCoK10S7+ edmQv1Sz3aGj6nMPMlrw1AlFKQYaD7yq2VFODqViueuEZMqhdEV9hIGjSHDX/s86/wJJ Tqd1E67XOwAPPgLSYsMcVMZ8yXdQovUf+Z7w/+YQ/oiyug0g4RsVR3LPBzIyf0CoMeFU bEMg== X-Gm-Message-State: AGRZ1gLVdSxKfpKbmVewl+/MaTfYpuY/8XXuuW+slXrT7lAVBM30At9q 7km/4VSBJg52NYHcUZtm/k7BZjmckPA= X-Received: by 2002:a17:906:74d7:: with SMTP id z23-v6mr9490417ejl.234.1542025651047; Mon, 12 Nov 2018 04:27:31 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id f11-v6sm4358545eds.23.2018.11.12.04.27.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 04:27:30 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: niklas.cassel@linaro.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/2] slimbus: ngd: Fix build error on x86 Date: Mon, 12 Nov 2018 12:25:25 +0000 Message-Id: <20181112122526.10337-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112122526.10337-1-srinivas.kandagatla@linaro.org> References: <20181112122526.10337-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org on non DT platforms like x86 of_match_node is set to NULL, dereferencing directly would throw an error. Fix this by doing this in two steps, get the match then the data. Reported-by: Greg KH Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ngd-ctrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.19.1 diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 7218fb963d0a..7de8907723a2 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1330,11 +1330,12 @@ static int of_qcom_slim_ngd_register(struct device *parent, { const struct ngd_reg_offset_data *data; struct qcom_slim_ngd *ngd; + const struct of_device_id *match; struct device_node *node; u32 id; - data = of_match_node(qcom_slim_ngd_dt_match, parent->of_node)->data; - + match = of_match_node(qcom_slim_ngd_dt_match, parent->of_node); + data = match->data; for_each_available_child_of_node(parent->of_node, node) { if (of_property_read_u32(node, "reg", &id)) continue; From patchwork Mon Nov 12 12:25:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 150825 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3081236ljp; Mon, 12 Nov 2018 04:27:37 -0800 (PST) X-Google-Smtp-Source: AJdET5dtUZumXqENyorgPFiaRMCROmWoNq01g+UzpOpguGWEjwgZZZfbIgT+NpUncaAdynRGZLfQ X-Received: by 2002:a17:902:6a3:: with SMTP id 32-v6mr756839plh.337.1542025657622; Mon, 12 Nov 2018 04:27:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542025657; cv=none; d=google.com; s=arc-20160816; b=WgluUFNc+r6DhG4w4FDj9tdzQGCo251W97mCT1O3KM5yDfkYvxiyGyLv0fsyINPSgg LbDeg1F5iQcReiJ4aZSttoU5eydFKrtzCDzjedVfI8g94Y/CfGcNKi1IuBQfUTcS5K1R TNK7WoIWeP5kHGJ3GgS2vyPFvmpupItU1gVBbkHtNcn0Nc97n1JguaA7y2TbxyyGJBON jLIY4qwYSWwodI1pTy0+ZaqbZwkE9rW26iFM/hFFkR27gWvNA7x1nUd8aI5qwp9XokJ/ S3PJ0aksVlTcuMV1ddiPZKjmg+yGZ5n9rGoDonGVE7J/1HkGPnvC96Y2HOjXw4T6nusJ yBVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UVFQHQKwJWclm9eD07zuiBHdhuKOYMmHPa/AOdWQ654=; b=y8+Nh9z5t3S2Ps0LlNgA0Lb8PCBkxx5EcINaDzFiHpohHzDmhoEucwHcmSTUxYW/g4 8Lvau7Z9uoeRQgsHWPzc2M4xb0KuPEWAM+GexxuYAmWBnWVlTlPNuHAfZZZDod91VRaS WDEQgY8nVF68UoptmLH5CFET7armQL8EwpCVb69mK/ryIwBxKXlWP9JutArq43hypDfu WY7Exn+8twLI/NEodlukbEwLSsEmNfwlNMSAiZFPkx8w0TO5RM+QvlFqBm2Sdiw3fJLM qcbIVXH/lZXIc1BSOqZVZGbIyD/1Albjaq1VQ3nE6/vS169HqPVpGOOrCgRG85zzuX6Q kP7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QPBSqUzw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si16658218pgs.126.2018.11.12.04.27.37; Mon, 12 Nov 2018 04:27:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QPBSqUzw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbeKLWUj (ORCPT + 32 others); Mon, 12 Nov 2018 17:20:39 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:35998 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbeKLWUh (ORCPT ); Mon, 12 Nov 2018 17:20:37 -0500 Received: by mail-ed1-f65.google.com with SMTP id a2-v6so7228586edt.3 for ; Mon, 12 Nov 2018 04:27:33 -0800 (PST) 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=UVFQHQKwJWclm9eD07zuiBHdhuKOYMmHPa/AOdWQ654=; b=QPBSqUzwOghjSCXd6ePIPl/Sz6utjR/GeGPYkX2JIN4Kusqs5UxS+Edj3mwPmh0J5D 6aW+M8l96InS4SJ2FANCLxE0sdQ/+1UFlvGSfTdjP5DxJyCyZ4gZRq8xs77pl5BCGGnv C+bW6fcW2vHMgdLhCKTQBQx7BnhgoX2XY5dUQ= 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=UVFQHQKwJWclm9eD07zuiBHdhuKOYMmHPa/AOdWQ654=; b=PsU7+CIcsWLeNdEwmQz1ARJYQlApU3qYphFrWUc2gzWdcgNb4pdsejqnI8ooWXUTLM MdwzwCJ+O7KcibIquuBSsOcsGs6nVbZ3DBt0zWgP9l/U7+id7Z2lK7AIlgsBIm4EYUdv RMlIQ7EmTXpAb40aPy5ranLS9AR0myIz4BqNcp71fqRThZktLxe9hYu6niX+TfRbh4OD 24t7Dh9zU3CQhKMimZWEela3lDcnYiCrtKdhlAdHk/OaEa7zY6a1oGWZ2oqnWcAMGTkY sDWCVZnkKR2Cq0dzlW8arERyfAfl3IAg+wHZqT0eLikw0ovtdrs3dBD8Lszo8c6xqmoh 0cUg== X-Gm-Message-State: AGRZ1gKGTRW0xFikU0eafVUv61UFpmwNXogq1hE8b0rek17BP+KaQp2C cc562X1HhRjdKMrPiigVq90IzQ== X-Received: by 2002:a50:ba3d:: with SMTP id g58-v6mr12294375edc.214.1542025652248; Mon, 12 Nov 2018 04:27:32 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id f11-v6sm4358545eds.23.2018.11.12.04.27.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 04:27:31 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: niklas.cassel@linaro.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/2] slimbus: ngd: QCOM_QMI_HELPERS has to be selected Date: Mon, 12 Nov 2018 12:25:26 +0000 Message-Id: <20181112122526.10337-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112122526.10337-1-srinivas.kandagatla@linaro.org> References: <20181112122526.10337-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Cassel QCOM_QMI_HELPERS is a hidden kconfig, so the proper usage is to select it, not depend upon it. Because of this change, we now also need to depend on the same Kconfigs as QCOM_QMI_HELPERS depends on. Signed-off-by: Niklas Cassel Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.19.1 diff --git a/drivers/slimbus/Kconfig b/drivers/slimbus/Kconfig index 9d73ad806698..8cd595148d17 100644 --- a/drivers/slimbus/Kconfig +++ b/drivers/slimbus/Kconfig @@ -22,8 +22,9 @@ config SLIM_QCOM_CTRL config SLIM_QCOM_NGD_CTRL tristate "Qualcomm SLIMbus Satellite Non-Generic Device Component" - depends on QCOM_QMI_HELPERS - depends on HAS_IOMEM && DMA_ENGINE + depends on HAS_IOMEM && DMA_ENGINE && NET + depends on ARCH_QCOM || COMPILE_TEST + select QCOM_QMI_HELPERS help Select driver if Qualcomm's SLIMbus Satellite Non-Generic Device Component is programmed using Linux kernel.