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: 65895 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1116905qge; Fri, 15 Apr 2016 04:16:17 -0700 (PDT) X-Received: by 10.98.10.29 with SMTP id s29mr29019558pfi.166.1460718977069; Fri, 15 Apr 2016 04:16:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kd12si2066926pad.15.2016.04.15.04.16.16; Fri, 15 Apr 2016 04:16:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbcDOLQO (ORCPT + 2 others); 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 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(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 */