From patchwork Fri May 23 10:31:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30714 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2EF7E20369 for ; Fri, 23 May 2014 10:35:46 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf21302093obc.11 for ; Fri, 23 May 2014 03:35:45 -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=SZyMBdASFqkxyxY2gW2gp/s7b4pt/lUERR2xPri/0zc=; b=dNXXGLFV5E0Kqlj6DyuwsH2xv2uedfCQrwGbZsZjlZKGhLMV8c75KGsuKitHXpT9Rb YjGquBBrUJSoHHA5guApg3h8VHaDhuA0HkXqvaljM4Y1kdXTfO/Bi2rYHprdLAKASXIR iq0DVkAsGH/MOfk+SExBJp/ihlYmgrT9ibc1WvPa52a1lw5W30cQ1s1Lgj8JWo59DZkA 4yT6kDHpb5iPddEDh8uMaUjQCZz/47uyQpG20BJtMg501xH/Uvxx8UaE49HKH2ClM5XK Q8ER/PtlR8PyFOD0V6TjrQp9lR2MmWEVESboHa2IuvLdNJBpPDX3S0Wi4v2d2oC5eakq 2SwA== X-Gm-Message-State: ALoCoQk6bbH1Y/pRFIG6E3+ZZxr3F1QQk/8e1E4sGCLiAWKz8b0qXGH0FP63KLaaAZPDd0e+aBdN X-Received: by 10.182.176.8 with SMTP id ce8mr1800546obc.7.1400841345767; Fri, 23 May 2014 03:35:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.133 with SMTP id t5ls1706048qgt.43.gmail; Fri, 23 May 2014 03:35:45 -0700 (PDT) X-Received: by 10.221.42.135 with SMTP id ty7mr3458113vcb.14.1400841345673; Fri, 23 May 2014 03:35:45 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id fe3si1388523vec.43.2014.05.23.03.35.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:35:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so5988129vcb.29 for ; Fri, 23 May 2014 03:35:45 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr2920296vdb.18.1400841345603; Fri, 23 May 2014 03:35:45 -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.220.221.72 with SMTP id ib8csp20010vcb; Fri, 23 May 2014 03:35:45 -0700 (PDT) X-Received: by 10.66.122.101 with SMTP id lr5mr4691855pab.130.1400841344901; Fri, 23 May 2014 03:35:44 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kk11si3267639pbd.111.2014.05.23.03.35.44 for ; Fri, 23 May 2014 03:35:44 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335AbaEWKff (ORCPT + 27 others); Fri, 23 May 2014 06:35:35 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:53785 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753140AbaEWKcy (ORCPT ); Fri, 23 May 2014 06:32:54 -0400 Received: by mail-wi0-f175.google.com with SMTP id f8so605177wiw.8 for ; Fri, 23 May 2014 03:32:53 -0700 (PDT) X-Received: by 10.194.157.226 with SMTP id wp2mr3306904wjb.58.1400841173519; Fri, 23 May 2014 03:32:53 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id s9sm2200908wix.13.2014.05.23.03.32.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:32:52 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 62/71] clocksource: Fix type confusion for clocksource_mmio_readX_Y Date: Fri, 23 May 2014 12:31:42 +0200 Message-Id: <1400841111-6683-62-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> References: <537F214C.8000700@linaro.org> <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> 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: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=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: , From: Xiubo Li The types' definations are: o cycle_t -> u64 o readl_relaxed -> u32 o readw_relaxed -> u16 So let clocksource_mmio_readX_Ys return a cast to cycle_t, though this maybe look reduntant sometimes, it make sense and they will be more readable and less confusion... This patch clarifies the functions type and fix it. Signed-off-by: Xiubo Li Cc: Daniel Lezcano Signed-off-by: Daniel Lezcano --- drivers/clocksource/mmio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c index c0e2512..19a6b3f 100644 --- a/drivers/clocksource/mmio.c +++ b/drivers/clocksource/mmio.c @@ -22,22 +22,22 @@ static inline struct clocksource_mmio *to_mmio_clksrc(struct clocksource *c) cycle_t clocksource_mmio_readl_up(struct clocksource *c) { - return readl_relaxed(to_mmio_clksrc(c)->reg); + return (cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg); } cycle_t clocksource_mmio_readl_down(struct clocksource *c) { - return ~readl_relaxed(to_mmio_clksrc(c)->reg); + return ~(cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg); } cycle_t clocksource_mmio_readw_up(struct clocksource *c) { - return readw_relaxed(to_mmio_clksrc(c)->reg); + return (cycle_t)readw_relaxed(to_mmio_clksrc(c)->reg); } cycle_t clocksource_mmio_readw_down(struct clocksource *c) { - return ~(unsigned)readw_relaxed(to_mmio_clksrc(c)->reg); + return ~(cycle_t)readw_relaxed(to_mmio_clksrc(c)->reg); } /**