Message ID | 20171213224111.17864-6-bjorn.andersson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6063793qgn; Wed, 13 Dec 2017 14:41:48 -0800 (PST) X-Google-Smtp-Source: ACJfBouF/rRMecxlxQvDZJyxyjHS8eceJisK+PCZ1GhfrtJ39jtGd1jV0jctDdeAbNYIyqT8ahjO X-Received: by 10.98.149.72 with SMTP id p69mr7598778pfd.76.1513204908621; Wed, 13 Dec 2017 14:41:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513204908; cv=none; d=google.com; s=arc-20160816; b=vy5Wfu94POKblNuA+gbUxDS3KU+Ohkc2dC6g+fifwdzvRm6gP6Fa4dKtIxVMdkoO1e Cmueei+H1S9zlmjYp7leGmS/QvXcYvhUg8cJumNyh/1gTP6n4wc/FZijEReL0WYG1PPB 7Yzbb9uS7vlriiDH2Q7XSmKHe4KFHS1FXajbZV0mrz37rUh+cc+5ZfFhAx481Gy6iARa Zsw3LpsYGrk/ra9Rjic1kVrXXXrm6nibQbPRqhyGB5qcmCjeYeUYbsr+2HgTcwEZdl61 pc7ZmCdWWGoQENwYZdX87HyQKyJyX+NysOdq9YmCQQjGlW9ZX4fkugiNfI1H/1CT9gaV FI+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Zcmq7LN6XwZSTJJcZ3bU/gby1PmpQujyigPB6KR2Kcg=; b=TuDSGamJ8TJqo9mgomhL+E+ywcd0Fa7f2kSeddBNKFzhZh8z7CUvZZbe+xOpPVAX7N NgLT62aplkyhsztsFX50+wKWifGW0ExjKwvUrapT0frLzo8LVm/OH24N04gHLi3aTKrD 7EIqVSb0UDh5YG9+HYS9+qyPGGpMIOHsSCVbG580s0iFIHcnB1aU3IUno5gM5e1DQt5P IrhvKPkK37oS37X9zvWjJNmR9Gbi9iTHf25dA6q4p9ybLeF1ZgSwbqmoPF8zxe3bESBl lWIicM7wYeanH9rr4CFLPSEgKlyVmdN/OgQzQoBC/SiVT9RwAoH8xiTlvLDPbYqWUFo8 +vcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YyEEZakf; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c78si2106352pfe.384.2017.12.13.14.41.48; Wed, 13 Dec 2017 14:41:48 -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=YyEEZakf; 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 S1753041AbdLMWlb (ORCPT <rfc822;georgi.djakov@linaro.org> + 23 others); Wed, 13 Dec 2017 17:41:31 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:45835 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752910AbdLMWlW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Dec 2017 17:41:22 -0500 Received: by mail-pf0-f195.google.com with SMTP id u19so2176922pfa.12 for <linux-kernel@vger.kernel.org>; Wed, 13 Dec 2017 14:41:22 -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; bh=Zcmq7LN6XwZSTJJcZ3bU/gby1PmpQujyigPB6KR2Kcg=; b=YyEEZakfzjIQvHKvjP0CzkOA7XpRTu4YwMLjikZWmgf5/jgEINZ6zo47ERyxDQ8Y3o 6NOu+y6+Xaz01Pmo6tuY7KiBWXnkBRSujpVO2hSeaPJZqK6A+sbJd0edxyDpYHBD/oZk VOL6CVbR4o1uvVS6XViIZf7Km/a9pZIYg+8r0= 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=Zcmq7LN6XwZSTJJcZ3bU/gby1PmpQujyigPB6KR2Kcg=; b=nCKpMc8b1bk8RDUACximBJan3DCSgcWQ4v8V8dJU6OoqzJIJbwntOeB0QcOH1Ibpl5 /3hae0A+c+9bFkDrOjzOU1Qha4NTieCWXyg/0TWqIhUwcy+V5J07cd8F8VVxTe5Iq9YU BegdwjvNIW+2EnTgAYRkP5OcZt4o8Zeayxl1uANACg+x+mdPwXoLnzee3kgmU7zTgA1x 29vTcHE/unidSYkVGDVhCaIgusQDp6StV4AYLRa9jemo1++QAo5sCbbvpVknrfvq4pQ1 dN/36jHj8vcqaocEntMyt11Vk14M0kI2MknkZNRuJFxEhqOOSd+c1lyOBC6TYLsSPrv2 blzg== X-Gm-Message-State: AKGB3mLnf/G3DP5V3GYiMXPomX+X3sQeAuybDTAE/dDDVl2BCO7VscY2 aP/jyPi1vnGAyP5/nrA2slxVQg== X-Received: by 10.98.111.137 with SMTP id k131mr7543707pfc.105.1513204881787; Wed, 13 Dec 2017 14:41:21 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id x15sm4464205pfh.27.2017.12.13.14.41.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Dec 2017 14:41:21 -0800 (PST) From: Bjorn Andersson <bjorn.andersson@linaro.org> To: Ohad Ben-Cohen <ohad@wizery.com>, Bjorn Andersson <bjorn.andersson@linaro.org> Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] remoteproc: Don't handle empty resource table Date: Wed, 13 Dec 2017 14:41:08 -0800 Message-Id: <20171213224111.17864-6-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171213224111.17864-1-bjorn.andersson@linaro.org> References: <20171213224111.17864-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
Remoteproc cleanups
|
expand
|
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index f2b6aa5d204c..63d88d1d206e 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -739,6 +739,9 @@ static int rproc_handle_resources(struct rproc *rproc, rproc_handle_resource_t handler; int ret = 0, i; + if (!rproc->table_ptr) + return 0; + for (i = 0; i < rproc->table_ptr->num; i++) { int offset = rproc->table_ptr->offset[i]; struct fw_rsc_hdr *hdr = (void *)rproc->table_ptr + offset;
Allow a NULL table_ptr to have the same meaning as a table with 0 entries, allowing a subsequent patch to skip the assignment step. A few other places in the implementation does dereference table_ptr, but they are currently all coming from rproc_handle_resources(). Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> --- drivers/remoteproc/remoteproc_core.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.15.0