From patchwork Fri Apr 15 11:16:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 8849821 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2A75C0553 for ; Fri, 15 Apr 2016 11:16:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20A7320295 for ; Fri, 15 Apr 2016 11:16:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A39B20374 for ; Fri, 15 Apr 2016 11:16:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbcDOLQO (ORCPT ); Fri, 15 Apr 2016 07:16:14 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:18105 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847AbcDOLQM (ORCPT ); Fri, 15 Apr 2016 07:16:12 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id u3FBFFq3010718; Fri, 15 Apr 2016 20:15:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u3FBFFq3010718 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1460718916; bh=ctp222sTqOj2ChRJpBJyt2I+PLG/BBdiVztRp1VpDAc=; h=From:To:Cc:Subject:Date:From; b=ooGY+/1sjwuRKmzrrHeqDhUrOAo4uhdAiSECpHcde/gwOLmLcfwPCqlk+McsPl8pF Gusds4t4zEFgSd0bMcC3h34jb7q4U7n/Syk3JKmgCFQi3DN9leDoMbkmoK8pxwQuov JlS3P+yEF7z6NwkAkCRvwNRWCOYwiPjBcQLM0TGzQH0sDtz+f2unobbPpwtlGmIW+M Gn0pWunXM0Dousx27yPOKkMnISuKUInXtS+MEu0TrDyvc+voR82yGRTAihkDW/xDC0 rqFm7qF984p2wNWxAdC6rcKPdHlVMQT30VHuQ7qrXmYYMvw2ktgE/F08mLbxnh00P0 3StAlQlLMdY5w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mmc@vger.kernel.org Cc: Masahiro Yamada , Adrian Hunter , Sergei Shtylyov , Kuninori Morimoto , linux-kernel@vger.kernel.org, Chaotian Jing , Wolfram Sang , Ulf Hansson Subject: [PATCH] mmc: drop unnecessary bit checking Date: Fri, 15 Apr 2016 20:16:12 +0900 Message-Id: <1460718972-17306-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This if-block is going to call mmc_card_set_blockaddr(), so mmc_card_blockaddr() right before it is redundant. I am fixing the block comment style while I am here. Signed-off-by: Masahiro Yamada --- drivers/mmc/core/mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 4dbe3df..c96bc81 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1483,12 +1483,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, if (err) goto free_card; - /* If doing byte addressing, check if required to do sector + /* + * If doing byte addressing, check if required to do sector * addressing. Handle the case of <2GB cards needing sector * addressing. See section 8.1 JEDEC Standard JED84-A441; * ocr register has bit 30 set for sector addressing. */ - if (!(mmc_card_blockaddr(card)) && (rocr & (1<<30))) + if (rocr & BIT(30)) mmc_card_set_blockaddr(card); /* Erase size depends on CSD and Extended CSD */