Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1330975pxv; Fri, 2 Jul 2021 00:46:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxcJkgKo/bB+llVT5gjWwdDvJppxwysGUXLD5HW3f/hzhidyVWQrTURvJJlQuk79ThZS2K X-Received: by 2002:a17:907:c08:: with SMTP id ga8mr3988034ejc.314.1625211977005; Fri, 02 Jul 2021 00:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625211976; cv=none; d=google.com; s=arc-20160816; b=kfkjcq3LVaq9Lg9tjL0jua8IPHOhiKwW4xfovg5rTUvUpiUnHK4BFGWVvbvd21ZX8s QZvEmcUlUeIY0XjHcGWdrFCdb/+UlpLFVYayKZ5CXDk9jdtL9LVjJ0dISHlwkJQLQR7y UzK/rOVQx0Bvt69sIxyO+deRHvIZSj3GzbmVSsdBfMyR4OWobiqiqSA/WtOfV/DeHNTi gTrSjFP6Oa6hE57UM88JD5Sn7BVjXA1AXUUqLges/G8gLvU33/qYD7j3oLgCyAmqtcpJ +P/DRzvfeHjEHe8/YdXo9j5I/dsNNqaLWSXoNc9XpFkT+abkJRYZvMQ4C2BPVlYcNZWE rbeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4CH7z9dtJCn3XGrA5BFatrdCjnmJPJqFx9k28BJYvw4=; b=epOj8tjAPd/e3DeApsC89u2686bKzxNImlgJjOyPYjEuS29ADQ+U0jLbwjxMRxhpGZ Xs/03BCjnCvvT3w7JiGzM5/25dew84v+SfVZ6CXFzqxO5+2MykFj8cVa15xPxUzS2C+S /6rLZMsVzg2jmw1SxXR6E+J6WqMi1YkX9mkDxsSZ0/15KbLeskA7mNxXChizW9JNsOcE kXWDQkD+IyefzC3FYXTmGJKEuc1FScksJ3zE38+DvdklSeLBkGnGwKW2ESNuPBHqFpzh pw/ORiobfRksOpqTml//hs8YjNDDg8ruYOHLtsE6irU1uYCFJDye9HCy5YEeOdInDu1n qNAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=q2JQaIVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si2379202edd.9.2021.07.02.00.45.53; Fri, 02 Jul 2021 00:46:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=q2JQaIVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbhGBHq0 (ORCPT + 99 others); Fri, 2 Jul 2021 03:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbhGBHq0 (ORCPT ); Fri, 2 Jul 2021 03:46:26 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB850C061762; Fri, 2 Jul 2021 00:43:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4CH7z9dtJCn3XGrA5BFatrdCjnmJPJqFx9k28BJYvw4=; b=q2JQaIVtatEQvVrOP2vatbAjeP QvnrFDnIb0xmoMuWF4uziCNyxvVulfk0rA1DCoAFzMocwPjGqRns905dFsmCH7iflD1E5SSIgL0Uf vBhUmpg86jy3IE1ljUG1eJ1i4+Jxy8x0x27UUEY9st9mfixYSKpGIzqt7N/WDDlifVWxtWDhcGI6C KuDiYiW8GzxIbznEtk4riXcXIL8HgKdSwa/4iPHMkObJWezpNaZ4K37+NABStwwfhPcfs8kL7eSHy uoDQjuj/mZIZ+nhj6clhVhORBTiiT4KUKhJtyg97/HAgkggke7AQdsS0MfxTDkGLaTnf+xIgvF35Z pxb8KbtA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzDps-007SyF-D2; Fri, 02 Jul 2021 07:43:44 +0000 Date: Fri, 2 Jul 2021 08:43:40 +0100 From: Christoph Hellwig To: Christian L?hle Cc: "linux-mmc@vger.kernel.org" , "ulf.hansson@linaro.org" , "linux-kernel@vger.kernel.org" , Avri Altman Subject: Re: [PATCH] mmc: block: Differentiate busy and non-TRAN state Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + /* > + * Cards will never return to TRAN after completing > + * identification commands or MMC_SEND_STATUS if they are not selected. > + */ > + return !(cmd->opcode == MMC_GO_IDLE_STATE > + || cmd->opcode == MMC_SEND_OP_COND > + || cmd->opcode == MMC_ALL_SEND_CID > + || cmd->opcode == MMC_SET_RELATIVE_ADDR > + || cmd->opcode == MMC_SET_DSR > + || cmd->opcode == MMC_SLEEP_AWAKE > + || cmd->opcode == MMC_SELECT_CARD > + || cmd->opcode == MMC_SEND_CSD > + || cmd->opcode == MMC_SEND_CID > + || cmd->opcode == MMC_SEND_STATUS > + || cmd->opcode == MMC_GO_INACTIVE_STATE > + || cmd->opcode == MMC_APP_CMD); This is not the normal kernel style, which puts operators at the end of the line. And while a little more verbose I think a switch statement would be a lot more readable here: switch (cmd->opcode) { case MMC_GO_IDLE_STATE: case MMC_SEND_OP_COND: case MMC_ALL_SEND_CID: case MMC_SET_RELATIVE_ADDR: case MMC_SET_DSR: case MMC_SLEEP_AWAKE: case MMC_SELECT_CARD: case MMC_SEND_CSD: case MMC_SEND_CID: case MMC_SEND_STATUS: case MMC_GO_INACTIVE_STATE: case MMC_APP_CMD: return false; default: return true; }