From patchwork Thu Dec 21 13:33:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 10127683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25CF66019C for ; Thu, 21 Dec 2017 13:52:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1493829C95 for ; Thu, 21 Dec 2017 13:52:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0960429C9B; Thu, 21 Dec 2017 13:52:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFFB629C95 for ; Thu, 21 Dec 2017 13:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753108AbdLUNwM (ORCPT ); Thu, 21 Dec 2017 08:52:12 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:47947 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752998AbdLUNwK (ORCPT ); Thu, 21 Dec 2017 08:52:10 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eS1Ga-0001MT-RF; Thu, 21 Dec 2017 14:52:08 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1eS0yQ-0000Ms-ES; Thu, 21 Dec 2017 14:33:22 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Chris Ball Cc: linux-mmc@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH mmc-utils 5/6] mmc-utils: move offsetof from mmc.h to only user Date: Thu, 21 Dec 2017 14:33:15 +0100 Message-Id: <20171221133316.19466-6-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171221133316.19466-1-u.kleine-koenig@pengutronix.de> References: <20171221133316.19466-1-u.kleine-koenig@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP offsetof isn't mmc specific, so remove it from mmc.h. As there is only a single user define it there. --- mmc.h | 4 ---- mmc_cmds.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mmc.h b/mmc.h index d01a55f18805..285c1f1c9423 100644 --- a/mmc.h +++ b/mmc.h @@ -19,10 +19,6 @@ #include -#ifndef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif - /* From kernel linux/major.h */ #define MMC_BLOCK_MAJOR 179 diff --git a/mmc_cmds.c b/mmc_cmds.c index f1c70fb5fe55..cec947da1d4a 100644 --- a/mmc_cmds.c +++ b/mmc_cmds.c @@ -38,6 +38,10 @@ #include "mmc_cmds.h" #include "3rdparty/hmac_sha/hmac_sha2.h" +#ifndef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif + #define WP_BLKS_PER_QUERY 32 #define USER_WP_PERM_PSWD_DIS 0x80