From patchwork Tue Oct 20 08:43:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 55285 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f71.google.com (mail-lf0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id EE6EC23024 for ; Tue, 20 Oct 2015 08:44:30 +0000 (UTC) Received: by lffz202 with SMTP id z202sf1874357lff.3 for ; Tue, 20 Oct 2015 01:44:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=BSgkE6pbaWHsdPLXJyIec8CEIGVHUhWW9CrU1W8T67E=; b=Vf/qNfHFpNAPxYVWwDNBZBz4G0kF3dxOMFMiHPwkQBqQ95h/fskp3XW8Phihp6BSgR iL68zNXoaTNgP2QVeqLSkqMWmAWljuIbjyGO2N6L9bHQ1id0uPqAIxcLQmOba/MR7WGc 3mZ43ar127VPKKGTJxVr2y8OABqULgVTExtKspMrs2go+wH0mraIQvRf5DI1wNSEX4K6 dOWCVLFCtZ6ZyCDYRrel6cjKYGNu5lyiPlc6dqQlQsIwq5nuBKD8Cv3T3WAccMPbCIGu mBmI/K81q/8rZ0V1cyxzdRC9Z6wSlJy1egf9DIsHK+/7siZ/Inogj9fEZqsVOp1KPMMH 8FnQ== X-Gm-Message-State: ALoCoQkB92pUWk1dmMqK2VJ0OfB58azuJnETAwl6bMpd8b6eQzNQ5yQpNzZwzsck/IzQCCcvdT44 X-Received: by 10.180.210.71 with SMTP id ms7mr461903wic.4.1445330669719; Tue, 20 Oct 2015 01:44:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.21.42 with SMTP id l42ls41289lfi.96.gmail; Tue, 20 Oct 2015 01:44:29 -0700 (PDT) X-Received: by 10.112.16.67 with SMTP id e3mr1026396lbd.5.1445330669524; Tue, 20 Oct 2015 01:44:29 -0700 (PDT) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id f67si1431326lfe.156.2015.10.20.01.44.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 01:44:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lffz202 with SMTP id z202so2030281lff.3 for ; Tue, 20 Oct 2015 01:44:29 -0700 (PDT) X-Received: by 10.25.150.199 with SMTP id y190mr695333lfd.35.1445330669434; Tue, 20 Oct 2015 01:44:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1941912lbq; Tue, 20 Oct 2015 01:44:28 -0700 (PDT) X-Received: by 10.66.219.162 with SMTP id pp2mr2634974pac.59.1445330668452; Tue, 20 Oct 2015 01:44:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sg1si3580416pbc.199.2015.10.20.01.44.28; Tue, 20 Oct 2015 01:44:28 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932244AbbJTIo0 (ORCPT + 28 others); Tue, 20 Oct 2015 04:44:26 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36692 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932153AbbJTIn4 (ORCPT ); Tue, 20 Oct 2015 04:43:56 -0400 Received: by wicfx6 with SMTP id fx6so34466257wic.1 for ; Tue, 20 Oct 2015 01:43:55 -0700 (PDT) X-Received: by 10.180.10.170 with SMTP id j10mr3165287wib.32.1445330635108; Tue, 20 Oct 2015 01:43:55 -0700 (PDT) Received: from localhost.localdomain (cag06-6-78-235-100-105.fbx.proxad.net. [78.235.100.105]) by smtp.gmail.com with ESMTPSA id kr10sm2390754wjc.25.2015.10.20.01.43.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Oct 2015 01:43:54 -0700 (PDT) From: Bartosz Golaszewski To: Wolfram Sang Cc: linux-i2c , LKML , Bartosz Golaszewski Subject: [RESEND PATCH 9/9] eeprom: at24: readability tweaks Date: Tue, 20 Oct 2015 10:43:27 +0200 Message-Id: <1445330607-12470-10-git-send-email-bgolaszewski@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445330607-12470-1-git-send-email-bgolaszewski@baylibre.com> References: <1445330607-12470-1-git-send-email-bgolaszewski@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bgolaszewski@baylibre.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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(-) diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 52875f4..0f873db 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -52,6 +52,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; @@ -98,14 +106,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)) \