Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935259AbeAKRTH (ORCPT + 1 other); Thu, 11 Jan 2018 12:19:07 -0500 Received: from faui40.informatik.uni-erlangen.de ([131.188.34.40]:36611 "EHLO faui40.informatik.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935149AbeAKRRr (ORCPT ); Thu, 11 Jan 2018 12:17:47 -0500 From: Fabian Huegel To: Oleg Drokin , Andreas Dilger , James Simmons , Lai Siyao , "John L . Hammond" , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Ben Evans , NeilBrown Cc: lustre-devel@lists.lustre.org, linux-kernel@vger.kernel.org, linux-kernel@i4.cs.fau.de, Fabian Huegel , Christoph Volkert Subject: [PATCH 3/8] staging: lustre: Remove DECLARE_LU_VARS macro Date: Thu, 11 Jan 2018 18:16:57 +0100 Message-Id: <1515691022-22729-4-git-send-email-fabian_huegel@web.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515691022-22729-1-git-send-email-fabian_huegel@web.de> References: <1515691022-22729-1-git-send-email-fabian_huegel@web.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: This macro was only used in four places to declare two variables. It saved one line of code, but in our opinion hurt readability. So we removed the macro, substituting every occurrence with the declaration of the two variables (like the preprocessor would have done). Signed-off-by: Fabian Huegel Signed-off-by: Christoph Volkert --- drivers/staging/lustre/lustre/include/obd_class.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index dbe8225..8fc14ed 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -489,14 +489,11 @@ static inline int obd_set_info_async(const struct lu_env *env, * obd_precleanup() and obd_cleanup() call both lu_device and obd operations. */ -#define DECLARE_LU_VARS(ldt, d) \ - struct lu_device_type *ldt; \ - struct lu_device *d - static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg) { int rc; - DECLARE_LU_VARS(ldt, d); + struct lu_device_type *ldt; + struct lu_device *d; ldt = obd->obd_type->typ_lu; if (ldt) { @@ -534,7 +531,8 @@ static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg) static inline int obd_precleanup(struct obd_device *obd) { int rc; - DECLARE_LU_VARS(ldt, d); + struct lu_device_type *ldt; + struct lu_device *d; rc = obd_check_dev(obd); if (rc) @@ -560,7 +558,8 @@ static inline int obd_precleanup(struct obd_device *obd) static inline int obd_cleanup(struct obd_device *obd) { int rc; - DECLARE_LU_VARS(ldt, d); + struct lu_device_type *ldt; + struct lu_device *d; rc = obd_check_dev(obd); if (rc) @@ -608,7 +607,8 @@ static inline int obd_process_config(struct obd_device *obd, int datalen, void *data) { int rc; - DECLARE_LU_VARS(ldt, d); + struct lu_device_type *ldt; + struct lu_device *d; rc = obd_check_dev(obd); if (rc) -- 2.7.4