From patchwork Tue Nov 24 09:44:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 57212 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1973048lbb; Tue, 24 Nov 2015 01:46:08 -0800 (PST) X-Received: by 10.98.14.15 with SMTP id w15mr21504880pfi.145.1448358368365; Tue, 24 Nov 2015 01:46:08 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3si15484069pas.116.2015.11.24.01.46.08; Tue, 24 Nov 2015 01:46:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754164AbbKXJpI (ORCPT + 28 others); Tue, 24 Nov 2015 04:45:08 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:37008 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754154AbbKXJo5 (ORCPT ); Tue, 24 Nov 2015 04:44:57 -0500 Received: by wmww144 with SMTP id w144so18147103wmw.0 for ; Tue, 24 Nov 2015 01:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Dk9VOx6iTo256zJ57MB6HrT+TSLKzoRpe1BpkzN+gh0=; b=iOZsfrSPJOAOs35k91NiUaJU4fgedUGWNSEiFeiHDMljOo0P2q1PvM9Na6jO5FjZhf oNMIzNQT2RLDZFYlNG0/klRZvZTqfeVm9Louhfzitk4SdsQN5qxQIztaovFFqOXmdgz8 KZaImjToSjFr7Eb5EmEadbfcxqHSDnOekelnZNoPD7xL8gNLGhUyTjk7CN5iYb89EKc2 JCU7YWV7H6EAVvVPAvu6DQN+9F3raKS3jWQxqpCQ9KEU7p+KOQYQc4jB9XhjnmjT1XIT GPo+Zqis4dl+4aStRCJsDoLaKL/xPvNROt5jn8KmJcAtA5qVs5vezrcl9f+QItdRjMMe 6CoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Dk9VOx6iTo256zJ57MB6HrT+TSLKzoRpe1BpkzN+gh0=; b=IjV9W4Im5iIxERjkVPRUDqxlm00z5WFIOz0SaitbIS41i4jBFzBErqFoehhx2n1P5Y +dmS54tbQ1lCCujZE1/QVlmlvURLZfjlyWed0znxNY+79lfElgmbjsIkkzwRaY3oKo3l P0nfMTEoXJXVowG/CU6Aoe/3+DkpAuLbCRTctEJ1JDdgjhaVbnU/cEFl7I2UaNezFTAP +r/+xP0iNaMgEikLf6wiILCcyDiDjJ3arAwvDXTxxzLT+xdyGsGqPYDIpUgZDGe5gwr9 OzGz8ckpQF0a7mffPIgSs2VWdxDz+UC0ggppq9FCwRbI9xT0h0DIZ5J/AjC6rSuMghaf EJmA== X-Gm-Message-State: ALoCoQkQCS9XPBiaxg+KRLG6Kss2dZppoFoAGMBh3dAXrUIBIn0UAOGyxJB6IRn3nIGUXPtCgNcT X-Received: by 10.194.6.196 with SMTP id d4mr16459134wja.120.1448358296284; Tue, 24 Nov 2015 01:44:56 -0800 (PST) Received: from bgdev-debian.home ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id cl5sm17353156wjc.29.2015.11.24.01.44.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Nov 2015 01:44:55 -0800 (PST) From: Bartosz Golaszewski To: Wolfram Sang Cc: linux-i2c , LKML , Bartosz Golaszewski Subject: [RESEND PATCH v2 9/9] eeprom: at24: readability tweaks Date: Tue, 24 Nov 2015 10:44:45 +0100 Message-Id: <1448358285-25016-10-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1448358285-25016-1-git-send-email-bgolaszewski@baylibre.com> References: <1448358285-25016-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the macro definitions above the struct definitions and add some tabs for better readability. Signed-off-by: Bartosz Golaszewski --- drivers/misc/eeprom/at24.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 1288193..3238bf6 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -53,6 +53,14 @@ * which won't work on pure SMBus systems. */ +#define AT24_SIZE_BYTELEN 5 +#define AT24_SIZE_FLAGS 8 + +#define AT24_BITMASK(x) (BIT(x) - 1) + +#define AT24CS_SERIAL_SIZE 16 +#define AT24CS_SERIAL_ADDR(addr) (addr + 0x08) + struct at24_data { struct at24_platform_data chip; struct memory_accessor macc; @@ -99,14 +107,6 @@ static unsigned write_timeout = 25; module_param(write_timeout, uint, 0); MODULE_PARM_DESC(write_timeout, "Time (in ms) to try writes (default 25)"); -#define AT24_SIZE_BYTELEN 5 -#define AT24_SIZE_FLAGS 8 - -#define AT24_BITMASK(x) (BIT(x) - 1) - -#define AT24CS_SERIAL_SIZE 16 -#define AT24CS_SERIAL_ADDR(addr) (addr + 0x08) - /* create non-zero magic value for given eeprom parameters */ #define AT24_DEVICE_MAGIC(_len, _flags) \ ((1 << AT24_SIZE_FLAGS | (_flags)) \