From patchwork Tue Mar 3 21:39:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frans Klaver X-Patchwork-Id: 445897 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CBB721400F1 for ; Wed, 4 Mar 2015 08:43:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=hzV4135Y; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YSua5-0003LT-0U; Tue, 03 Mar 2015 21:42:21 +0000 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YSuZo-00037E-2Y for linux-mtd@lists.infradead.org; Tue, 03 Mar 2015 21:42:07 +0000 Received: by wggx13 with SMTP id x13so2613473wgg.4 for ; Tue, 03 Mar 2015 13:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LuMpDv0ee3iio6Z9nlCo9Dm4LhpQq9UMe+VZCI6kSnc=; b=hzV4135YOBQbATkT14wijNkIct/rrYnNXuz2mbmjxr4YvNAmEEkDYy9wE9Govn4jI/ Up7YKBAoGjQI7OBqCkV+0TvG9hoBF6Mh2jaX4+YZrU56K6TpKa3LkIZephI5i5BDeiTK ncxkjKJbeyxAXfLSwDotH0BTgGQo38/LDy7dls7Y1COsKDiYuATEUVx5VLdxGL8Dm47T xSTz/U936je8PhIH8WYwKQvd/Grv6wLWyMIdTRBOz0nw8SRo2L8yHYOLCO5QGWRHd58R PsPhBT1b+vtee/eoWu+KNdVtjv2T1PpZJ5814usrTtm6AnPAlZB+g4wdcivnddCViI17 6noQ== X-Received: by 10.194.177.195 with SMTP id cs3mr1267978wjc.141.1425418900356; Tue, 03 Mar 2015 13:41:40 -0800 (PST) Received: from localhost.localdomain (82-171-48-45.ip.telfort.nl. [82.171.48.45]) by mx.google.com with ESMTPSA id dz6sm1256495wib.0.2015.03.03.13.41.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Mar 2015 13:41:39 -0800 (PST) From: Frans Klaver To: Brian Norris Subject: [PATCH 01/60] mtd: core: tone down suggestion that dev.parent should be set Date: Tue, 3 Mar 2015 22:39:45 +0100 Message-Id: <1425418844-25177-2-git-send-email-fransklaver@gmail.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1425418844-25177-1-git-send-email-fransklaver@gmail.com> References: <1425418844-25177-1-git-send-email-fransklaver@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150303_134204_307035_E79E7BDF X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c00:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (fransklaver[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-mtd@lists.infradead.org, Frans Klaver , David Woodhouse , linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org add_mtd_device() has a comment suggesting that the caller should have set dev.parent. This is required to have the device show up in sysfs, but not for proper operation of the mtd device itself. Currently we have five drivers registering mtd devices during module initialization, so they don't actually provide a parent device to link to. That means we cannot WARN_ON() here, as it would trigger false positives. Make the comment a bit less firm in its assertion that dev.parent should be set. Signed-off-by: Frans Klaver --- drivers/mtd/mtdcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 11883bd..2093676 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -422,7 +422,7 @@ int add_mtd_device(struct mtd_info *mtd) } /* Caller should have set dev.parent to match the - * physical device. + * physical device, if appropriate. */ mtd->dev.type = &mtd_devtype; mtd->dev.class = &mtd_class;