From patchwork Mon Oct 20 10:51:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 401062 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 23CDB140085 for ; Mon, 20 Oct 2014 21:52:59 +1100 (AEDT) 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 1XgAZ2-0002cb-C6; Mon, 20 Oct 2014 10:51:48 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgAZ0-0002az-In for linux-mtd@lists.infradead.org; Mon, 20 Oct 2014 10:51:46 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Oct 2014 03:51:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,755,1406617200"; d="scan'208";a="621789325" Received: from linux.jf.intel.com (HELO linux.intel.com) ([10.23.219.25]) by orsmga002.jf.intel.com with ESMTP; 20 Oct 2014 03:51:25 -0700 Received: from [10.237.72.162] (sauron.fi.intel.com [10.237.72.162]) by linux.intel.com (Postfix) with ESMTP id A7BBE6A4083; Mon, 20 Oct 2014 03:50:34 -0700 (PDT) Message-ID: <1413802282.7906.223.camel@sauron.fi.intel.com> Subject: Re: [PATCH 2/2] mtd-utils: Remove duplicate macros from mkfs.ubifs/def.h From: Artem Bityutskiy To: hujianyang Date: Mon, 20 Oct 2014 13:51:22 +0300 In-Reply-To: <543FB535.10105@huawei.com> References: <543FB3C1.9050800@huawei.com> <543FB535.10105@huawei.com> X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141020_035146_659113_AF700FFE X-CRM114-Status: GOOD ( 16.26 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [134.134.136.20 listed in list.dnswl.org] 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.2 FREEMAIL_REPLYTO_END_DIGIT Reply-To freemail username ends in digit (dedekind1[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dedekind1[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [134.134.136.20 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list Cc: linux-mtd 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: , Reply-To: dedekind1@gmail.com Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Thu, 2014-10-16 at 20:08 +0800, hujianyang wrote: > +#define PROGRAM_NAME "compr" PROGRAM_NAME is the name of the end program, and there is no 'compre' or 'lpt' program. Instead of this patch, I've pushed the one below, thanks! From dd183c2c8000d42073d19fefc2740dc50bafd287 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 20 Oct 2014 13:47:09 +0300 Subject: [PATCH] mkfs.ubifs: start using common code Several commonly used macros are now defined in 'common.h', let's start using them in mkfs.ubifs, instead of duplicating them. Signed-off-by: Artem Bityutskiy --- mkfs.ubifs/defs.h | 15 --------------- mkfs.ubifs/mkfs.ubifs.c | 1 - mkfs.ubifs/mkfs.ubifs.h | 4 ++++ 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/mkfs.ubifs/defs.h b/mkfs.ubifs/defs.h index 06cf9e5..1fa3316 100644 --- a/mkfs.ubifs/defs.h +++ b/mkfs.ubifs/defs.h @@ -29,21 +29,6 @@ #define le32_to_cpu(x) (t32((x))) #define le64_to_cpu(x) (t64((x))) -#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) -#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) - -#define min_t(t,x,y) ({ \ - typeof((x)) _x = (x); \ - typeof((y)) _y = (y); \ - (_x < _y) ? _x : _y; \ -}) - -#define max_t(t,x,y) ({ \ - typeof((x)) _x = (x); \ - typeof((y)) _y = (y); \ - (_x > _y) ? _x : _y; \ -}) - #define unlikely(x) (x) #define ubifs_assert(x) ({}) diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c index 200c8a5..ca17e2b 100644 --- a/mkfs.ubifs/mkfs.ubifs.c +++ b/mkfs.ubifs/mkfs.ubifs.c @@ -21,7 +21,6 @@ */ #define _XOPEN_SOURCE 500 /* For realpath() */ -#define PROGRAM_NAME "mkfs.ubifs" #include "mkfs.ubifs.h" #include diff --git a/mkfs.ubifs/mkfs.ubifs.h b/mkfs.ubifs/mkfs.ubifs.h index 6030c48..3edb79d 100644 --- a/mkfs.ubifs/mkfs.ubifs.h +++ b/mkfs.ubifs/mkfs.ubifs.h @@ -46,6 +46,10 @@ #include #include +/* common.h requires the PROGRAM_NAME macro */ +#define PROGRAM_NAME "mkfs.ubifs" +#include "common.h" + #include "libubi.h" #include "defs.h" #include "crc16.h"