Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp945189imu; Thu, 20 Dec 2018 07:45:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/X7AwXhrFMDUw8CRGSZDsOtN0xAFG8IXVVjoPwxGSODJhLsVKNMJHsei+jGo2ReZ0UC3FBV X-Received: by 2002:a17:902:2c03:: with SMTP id m3mr25489705plb.125.1545320739118; Thu, 20 Dec 2018 07:45:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545320739; cv=none; d=google.com; s=arc-20160816; b=U7HdC8Of+/uzsJWrp7IScTwEQZEI1qyd5lTkYVDSEOFGs5WyklvOwuXFhgC5OqHFbY uUm9hZgzlfh1nmYBfbcamDDAFF/BoM6W9FpZ7STYGI4skbDTzMtCKahx3pI2MLyObxDN /rWFUW9HgThFp250lqKYhabw7ObAVAkStvfvK6OPR1178eucFL/kvYtdoSK8w9tXalOY UNphPJC77BB2q6aIvZdiBmLaY1yK0GhT77fFkjbPfCslebDgc6yzUZtYbBhYj+hk7XQP ZuzWkDi7E1vUfjSmB1GWnoagzzdPH7ahTG+I4j+geJqCm/t28jPEENAr2LfRQNkWXWXp lcyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter; bh=Cw3DdqCKr3SKDlrUZLWOJxtsVC0jIssC1KyVfRIzyTA=; b=CC5JXlHSwODLCJvfDPeS16O5A3MBRenh4bbFgukgOEhznI1oedQ5zyVRNCmy2jKK/y lESZ1fkUx+oRsbtAIUALI6QIL+OEfMbhCuUPYr4ET6yUE/JztchZRb8j1dJQ7LFnvZFV tiOAI9DWSEDO660e6exeoOVcj9dqyu37CO+80Bazs4wBjyRMo6kqMjXICxBb4UGFfzJ/ IvMan/DiOzFRbu4q8ILXyI11UHgFvjyAoL67tKEEVRx6bFAQDB/00FHR68uwkKIBCfzZ CsyFvEX4XntARv7P5Iw/BuUO35t59qs6kHutRi+IZLSOe/Botya0tq8NjfqceYCNonaS m6Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kwzAOckJ; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 27si18611174pgu.421.2018.12.20.07.45.23; Thu, 20 Dec 2018 07:45:39 -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=@samsung.com header.s=mail20170921 header.b=kwzAOckJ; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732003AbeLTM1q (ORCPT + 99 others); Thu, 20 Dec 2018 07:27:46 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:37295 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728831AbeLTM1p (ORCPT ); Thu, 20 Dec 2018 07:27:45 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181220122744euoutp0154915cd749559af4cc3195c1899d8dbb~yCjmMLdVK2150821508euoutp01o for ; Thu, 20 Dec 2018 12:27:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181220122744euoutp0154915cd749559af4cc3195c1899d8dbb~yCjmMLdVK2150821508euoutp01o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1545308864; bh=Cw3DdqCKr3SKDlrUZLWOJxtsVC0jIssC1KyVfRIzyTA=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=kwzAOckJtKo35ZKCeGeqlf2IckB+uiB3/2M5wI1Q8q3hga34D3kbJEImPOu8wP0Us 4ucJsSZi7m9edN0+A2xF60InOLoyP67IaEytIddcsKFUkz4xS73OoobVtV6cGuWGOb e70ROV2HNS26o8+hKlZiWn49/AncfQQp2JP9mY2o= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181220122743eucas1p297f022e703da115e7d1853f70fb66d23~yCjlYikSY2820628206eucas1p2e; Thu, 20 Dec 2018 12:27:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 42.C8.04806.FBA8B1C5; Thu, 20 Dec 2018 12:27:43 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181220122742eucas1p14614fd6417d91aca49c6b319f11d9ffa~yCjkUko5-0230602306eucas1p1m; Thu, 20 Dec 2018 12:27:42 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181220122742eusmtrp2c17122f07d57248eab94e75ded70e267~yCjkF39dv2401724017eusmtrp2Y; Thu, 20 Dec 2018 12:27:42 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-1a-5c1b8abf11a0 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 64.2A.04284.EBA8B1C5; Thu, 20 Dec 2018 12:27:42 +0000 (GMT) Received: from [106.120.43.17] (unknown [106.120.43.17]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181220122741eusmtip293e460dcb8fd14c78754ead25a4adfe6~yCjjrwUQs2864028640eusmtip2u; Thu, 20 Dec 2018 12:27:41 +0000 (GMT) Subject: Re: [PATCH v4 2/3] driver core: add deferring probe reason to devices_deferred property To: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Linux Kernel Mailing List , javierm@redhat.com, Linux ARM , Andy Shevchenko , Mark Brown , Russell King - ARM Linux From: Andrzej Hajda Message-ID: Date: Thu, 20 Dec 2018 13:27:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Transfer-Encoding: 7bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGKsWRmVeSWpSXmKPExsWy7djPc7r7u6RjDG5tELB4OeEwo8XGGetZ LaY+fMJm0bx4PZvFwmnLGS02Pb7GanF51xw2i0NT9zJarD1yl91i7pepzA5cHpevXWT22Dnr LrvHplWdbB77565h99i8pN7j/b6rbB59W1YxenzeJBfAEcVlk5Kak1mWWqRvl8CVse72KcaC xYIVq5aeZG5gfMzbxcjJISFgIrF26l+2LkYuDiGBFYwSqz/COF8YJd5cWccC4XxmlPiw4T4T TMvpvh1MEInljBK/pv6AannLKNHT8ZQdpEpYIEnix+tTzCC2iIC2xJJFV8FsZoFFzBLvdmiA 2GwCmhJ/N99kA7F5Bewknj1exNjFyMHBIqAqcXclH0hYVCBCouP+aqgSQYmTM5+wgJRwCgRK zLyXDTFRXmL72zlQ08Ulbj2ZD3abhMAjdomXEyaxQhztInH560dGCFtY4tXxLewQtozE/53z oR6rl2iaeYUZormDUeLE4uVsEAlricPHL7KCLGYGunn9Ln2IsKPEsYlnmUHCEgJ8EjfeCkLc wCcxadt0qDCvREebEES1osT9s1uZIWxxiaUXvrJNYFSaheSxWUi+mYXkm1kIexcwsqxiFE8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0tSC2C6WPi 4JRqYEzdNdH+lZsUu3qsqZ3ozZqFVaWT4uzkcjsm630K5u15qVUi8mW9fP+ahOkHDyUzML/k PCG/mFc5enHzzzl9hgvbp6T8M69dGtKU8XivR0fcq+37lgRK+L585ODWlnt66zendRu+S2yN t+P7el9K8cG3Ld173uyN1ZT582R7x8LJe/L/7dvxsUKJpTgj0VCLuag4EQCeO41A7QIAAA== X-CMS-MailID: 20181220122742eucas1p14614fd6417d91aca49c6b319f11d9ffa X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181220102259eucas1p1884a0b68ce342239c2a43a74cc50725a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181220102259eucas1p1884a0b68ce342239c2a43a74cc50725a References: <20181220102247.4911-1-a.hajda@samsung.com> <20181220102247.4911-3-a.hajda@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.12.2018 12:04, Rafael J. Wysocki wrote: > On Thu, Dec 20, 2018 at 11:23 AM Andrzej Hajda wrote: >> /sys/kernel/debug/devices_deferred property contains list of deferred devices. >> This list does not contain reason why the driver deferred probe, the patch >> improves it. >> The natural place to set the reason is probe_err function introduced recently, >> ie. if probe_err will be called with -EPROBE_DEFER instead of printk the message >> will be attached to deferred device and printed when user read devices_deferred >> property. >> >> Signed-off-by: Andrzej Hajda >> Reviewed-by: Mark Brown >> Reviewed-by: Javier Martinez Canillas >> Reviewed-by: Andy Shevchenko >> --- >> v4: >> - removed NULL check before kfree, >> - coding style tweaking. >> v3: >> - adjusted deferred_devs_show, to accept newline ended messages, >> - changed conditonal check to positive, >> - added R-b by Andy. >> v2: >> - changed __deferred_probe_set_msg args - like in __dev_printk, fits better, >> - use kasprintf instead of bunch of code, >> - keep consistent format of devices_deferred lines, >> - added R-Bs (again I hope changes above are not against it). >> --- >> --- >> drivers/base/base.h | 3 +++ >> drivers/base/core.c | 9 +++++---- >> drivers/base/dd.c | 21 ++++++++++++++++++++- >> 3 files changed, 28 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/base/base.h b/drivers/base/base.h >> index 7a419a7a6235..effbd5e7f9f1 100644 >> --- a/drivers/base/base.h >> +++ b/drivers/base/base.h >> @@ -75,6 +75,7 @@ struct device_private { >> struct klist_node knode_driver; >> struct klist_node knode_bus; >> struct list_head deferred_probe; >> + char *deferred_probe_msg; > Many drivers will never use this, so is the memory overhead justified? I can try to move it somewhere else if it is a problem. Putting it here seems quite natural - near deferred_probe field which should have similar number of users. Regards Andrzej > >> struct device *device; >> }; >