From patchwork Tue Aug 21 20:19:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shmulik Ladkani X-Patchwork-Id: 179157 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 818062C007E for ; Wed, 22 Aug 2012 06:20:53 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T3uvX-00037O-GA; Tue, 21 Aug 2012 20:19:51 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T3uvU-00036o-Oc for linux-mtd@lists.infradead.org; Tue, 21 Aug 2012 20:19:50 +0000 Received: by wgbez12 with SMTP id ez12so132288wgb.18 for ; Tue, 21 Aug 2012 13:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=y7hGZG7GCEJNacpNtkLDIpT7knzwNOeDNCaPFjaQy/Q=; b=l/IWbhEkU0zyNphmAYlBMx5b1PX9T5d9lOWLiBDulEsSOeu3kGqW6Ufc5zzFAmfHmb kQmWHSSghgyJTvvLXS02NcoO2+UvwhQlqt7OsdPt+ZIeTaLDT7PY2veFJn/Vh9ccXDCh gLV0Xjy1kl/fNTMfxC1Xz3pix9VqUD0w6iXIwMdKmtzAEQRj+kPu0JRIvJAbx0J/YSte QaBgQbQ2peByncyfvQd0C26J6HLUb3+h5JDX2UsnK1z/vKHRmYVV/3rVOLDsuLH23AtW 16ZGtrCsvyHtOVzs9ezL+XWmUUcpxAefs9CUjF3EyPH+ySItgxbPTpIq1+vd8Np1smk/ TWTQ== Received: by 10.216.29.17 with SMTP id h17mr9523137wea.221.1345580384949; Tue, 21 Aug 2012 13:19:44 -0700 (PDT) Received: from halley (93-172-55-136.bb.netvision.net.il. [93.172.55.136]) by mx.google.com with ESMTPS id dc3sm35341074wib.7.2012.08.21.13.19.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 13:19:44 -0700 (PDT) Date: Tue, 21 Aug 2012 23:19:33 +0300 From: Shmulik Ladkani To: dedekind1@gmail.com Subject: Re: [PATCH v2 3/7] UBI: accept empty string for vid_hdr_offs parameter Message-ID: <20120821231933.722f5be4@halley> In-Reply-To: <1345467898.2848.29.camel@sauron.fi.intel.com> References: <1345464561-24464-1-git-send-email-richard.genoud@gmail.com> <1345464561-24464-4-git-send-email-richard.genoud@gmail.com> <20120820155210.64d64803@pixies.home.jungo.com> <1345467898.2848.29.camel@sauron.fi.intel.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shmulik.ladkani[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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: Richard Genoud , linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list 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 On Mon, 20 Aug 2012 16:04:58 +0300 Artem Bityutskiy wrote: > Please, let's not over-engineer this, do not bother with ",,", use ",0," > instead. Just do amend the documentation properly. Artem, you are probably right, but it was really a one-liner: But either case, I guess the user will probably still need to take a look at the description to understand how to "avoid specifying" the vid_hdr_offs ;-) So no real benefit supporting ",," Bit more intuitive, though. Anyways, saw you already pushed, thanks. Shmulik diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 2c5ed5c..1745764 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -1333,7 +1333,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) p = &mtd_dev_param[mtd_devs]; strcpy(&p->name[0], tokens[0]); - if (tokens[1]) + if (tokens[1] && *tokens[1] != '\0') p->vid_hdr_offs = bytes_str_to_int(tokens[1]); if (p->vid_hdr_offs < 0)