Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp141705pxb; Fri, 17 Sep 2021 21:43:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqjG8N7O9lwEKqOeutA6p8Fsgq988Kl0UbZ49/JAlu0hsLocwNbCzhgo6Zi7fMDovFJWVy X-Received: by 2002:aa7:ca19:: with SMTP id y25mr16401041eds.197.1631940218737; Fri, 17 Sep 2021 21:43:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631940218; cv=none; d=google.com; s=arc-20160816; b=Pn3JbYuWoqNpEdv7J/6ycBfoitMKEy5SoZNfA5w9/WdPxlhUfl/mEqzDW6J1O4GTfu tEdehzNZqhxavJxBc5FnR2J6TxtwiT4u+kUoN6XPTMxWNKnUBElTlIgFAK95ISPi2OkU eNR0jpZmHwxEtquGIqcaUl53l7fmHYElx5EL9DMpWUBi0ro8LtfdpXqp0qA7BfhN0XDm 7PC7sJMMkWMn5hjN/psG6CyaK8MTctw3Xxup6AVdXI1R3o6CrUgBHe33xMrksz++Y658 sFqLrNYAA9wQljK2YAfVvaW/5vLqC4tpIk1inPbSwuQFv22cqaa5xH5mBrJ+a67yZitu nyCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=h2nvr9WySpUfoUUOMesCSZna6xZu3VYn2QdrgFpGv/g=; b=KVveojxlTeM/WFDJj4pBpN0IAQJPu+U4TYE7etoDNU6ZEVQiEtVf+PhJ3J1ac4Jpn2 pTr8NsLgP3kCPQvcqQoif6u7AG4KF4F6GMjLys8wUGmTv7+F1xfOpZe3B8uqiVQhoO/3 GR5ncwMwyJl2y8W6hpMURoHLAcz1AeSpBtf4SHMXZ9oUuVmhiPs+vdV7EAFPLdui3f/f jE2gZ297SLdx2SzamGZt3bCYDt2QI+sXGj6e2RtwcCcj0PQEUWzgaCn2tQ3lSjY4KKWJ nIRQbsicHDBsWWvJlzm7PkquX4CJirPybpCEaw5QvlsphtmpBmZFX0j9j/A1iP8wUBCD Xzdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si8533850edw.118.2021.09.17.21.43.15; Fri, 17 Sep 2021 21:43:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241879AbhIQU7k (ORCPT + 99 others); Fri, 17 Sep 2021 16:59:40 -0400 Received: from mail-oi1-f180.google.com ([209.85.167.180]:46990 "EHLO mail-oi1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243817AbhIQU7j (ORCPT ); Fri, 17 Sep 2021 16:59:39 -0400 Received: by mail-oi1-f180.google.com with SMTP id s69so8196381oie.13; Fri, 17 Sep 2021 13:58:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=h2nvr9WySpUfoUUOMesCSZna6xZu3VYn2QdrgFpGv/g=; b=vbEJx4oBqZEAAuFnj+0WQk7bdRb2pCRG0aYsqFymVRiiyxfXCd+aWJQ6nuinlSc5h2 mOVBBWT0V7M9Ol0fl0H0m5fcno3lb3OAt94WFhkvJsVrIVIgVP1H18lEDpuRzuYxerqP ydDirplvg/I1ncqUxhfmb+PlN4DM1gOD8f7nlNIaempM6FRXyexVYSYKm/w43r1+6mbL IDD9B3SWJ8OU5bljM605alx3jYYUnwG5WWV0XSTGxH8wQfa+1fovKDEYG1n+FwA3kw4a 3PoLhAeLz/AIhYeujk0tW1mdDU+xTFr7V9dEV5rWHD78G4f3pVy+9YqYfpLlW2afJEyA Oc6w== X-Gm-Message-State: AOAM533zp7p+jCwBIMo49hp+u+UCRSwtu3DGyNvgVECCTydU+rcwr/Zr p2BdIuaCKmHqSBRXT6RNgw== X-Received: by 2002:aca:2b05:: with SMTP id i5mr5522594oik.55.1631912296452; Fri, 17 Sep 2021 13:58:16 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id b2sm1786450ook.46.2021.09.17.13.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 13:58:12 -0700 (PDT) Received: (nullmailer pid 2146896 invoked by uid 1000); Fri, 17 Sep 2021 20:58:11 -0000 Date: Fri, 17 Sep 2021 15:58:11 -0500 From: Rob Herring To: David Brazdil Cc: Rob Herring , devicetree@vger.kernel.org, Konrad Rzeszutek Wilk , Frank Rowand , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH] of: restricted dma: Fix condition for rmem init Message-ID: References: <20210917131423.2760155-1-dbrazdil@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210917131423.2760155-1-dbrazdil@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Sep 2021 14:14:23 +0100, David Brazdil wrote: > of_dma_set_restricted_buffer fails to handle negative return values from > of_property_count_elems_of_size, e.g. when the property does not exist. > This results in an attempt to assign a non-existent reserved memory > region to the device and a warning being printed. Fix the condition to > take negative values into account. > > Fixes: f3cfd136aef0 ("of: restricted dma: Don't fail device probe on > rmem init failure") > Cc: Will Deacon > Signed-off-by: David Brazdil > --- > drivers/of/device.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > Applied, thanks!