From patchwork Wed Jun 22 04:21:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 101390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 38D88B6F8E for ; Wed, 22 Jun 2011 14:21:17 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZEvz-0003R8-4I; Wed, 22 Jun 2011 04:20:59 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZEvy-0008Rf-NQ; Wed, 22 Jun 2011 04:20:58 +0000 Received: from mail-pv0-f177.google.com ([74.125.83.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZEvv-0008RM-D9 for linux-mtd@lists.infradead.org; Wed, 22 Jun 2011 04:20:57 +0000 Received: by pvg20 with SMTP id 20so262686pvg.36 for ; Tue, 21 Jun 2011 21:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:reply-to:to:cc:date:in-reply-to :references:content-type:x-mailer:content-transfer-encoding :message-id:mime-version; bh=+VNFMVOt099ZYzEdysp01IDJBBZmacKPugeZ2sWgqAo=; b=O46lfsXYqGnshPaTq1st7iOX8y/Jyop9v3mufwKgC9Sf5QGGMKCMCbtS8YTtKfj+le f29TFr4K2JuAzdq7d7WGDLLBZgT1jAo67VtkC1SWuW2+3aT92SvTYFHeAP9xPK63c+Ay 4zqPIW4eAVVBcy2CdlGEqUvkTJEkC/YvjGY7Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:date:in-reply-to:references :content-type:x-mailer:content-transfer-encoding:message-id :mime-version; b=sq2LuHINkRV0mfe8R/mGpIBkfNLUZPL3pBi73//jwIfn6zPlP0ZLvmvKGKpt4+jTil d0JWTDMl6p+J/slWtwJvS2okeCq/Thdo68R3CC1ZGI3DKzDrFtaybJMbtUNCga/nTrMh yQmKtXet8COcKUsC/4w2q0So/elNfOJgRzFzE= Received: by 10.68.22.162 with SMTP id e2mr80696pbf.445.1308716450023; Tue, 21 Jun 2011 21:20:50 -0700 (PDT) Received: from [127.0.0.1] ([134.134.139.76]) by mx.google.com with ESMTPS id g2sm146178pbh.63.2011.06.21.21.20.47 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2011 21:20:48 -0700 (PDT) Subject: Re: [PATCH 01/18] mtd: abstract last MTD partition parser argument From: Artem Bityutskiy To: Dmitry Eremin-Solenikov Date: Wed, 22 Jun 2011 07:21:32 +0300 In-Reply-To: <1307833922-21602-2-git-send-email-dbaryshkov@gmail.com> References: <1307833922-21602-1-git-send-email-dbaryshkov@gmail.com> <1307833922-21602-2-git-send-email-dbaryshkov@gmail.com> X-Mailer: Evolution 3.0.2 (3.0.2-2.fc15) Message-ID: <1308716496.18119.8.camel@sauron> Mime-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110622_002055_651281_F9E2BEAC X-CRM114-Status: GOOD ( 18.46 ) X-Spam-Score: 1.4 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (dedekind1[at]gmail.com) 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.177 listed in list.dnswl.org] -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 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain Cc: David Woodhouse , linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org I see a lot of checkpatch.pl warnings, could you please take a look? Also, my gcc produces warnings with this patch because you have not fixed up MPT parsers, e.g., like this: On Sun, 2011-06-12 at 03:11 +0400, Dmitry Eremin-Solenikov wrote: > - * @origin: start address of MTD device, %0 unless you are sure you need this. > + * @parser_data: data passed to mtd parsers Nitpick, but could you call this MTD partition parser-specific data instead. > * @pparts: array of partitions found is returned here > - * @origin: MTD device start address (use %0 if unsure) > + * @data: data passed to MTD partition parsers And this. > +/** > + * struct mtd_part_parser_data - used to pass data to MTD partition parsers. > + * @origin: for RedBoot, start address of MTD device, %0 unless you are sure you need this. > + */ > +struct mtd_part_parser_data { > + unsigned long origin; > +}; Could you please embrace the origin field into an anonymous union - once we add the of_node field they do not have to be at separate addresses. I mean: struct mtd_part_parser_data { union { unsigned long origin; struct device_node *of_node; }; }; diff --git a/drivers/mtd/ar7part.c b/drivers/mtd/ar7part.c index 6697a1e..71bfa2e 100644 --- a/drivers/mtd/ar7part.c +++ b/drivers/mtd/ar7part.c @@ -46,7 +46,7 @@ struct ar7_bin_rec { static int create_mtd_partitions(struct mtd_info *master, struct mtd_partition **pparts, - unsigned long origin) + struct mtd_part_parser_data *data) { struct ar7_bin_rec header; unsigned int offset;