Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5072374rwb; Tue, 17 Jan 2023 08:52:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXvvsVFw8cOTuvQGwqtrdS9NidRDagGC8zAtw5YbL4hGIeXzLTxwp/UNq45TZFlZRUL8XzTD X-Received: by 2002:a17:907:c307:b0:84c:c121:dc53 with SMTP id tl7-20020a170907c30700b0084cc121dc53mr3637554ejc.34.1673974368527; Tue, 17 Jan 2023 08:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673974368; cv=none; d=google.com; s=arc-20160816; b=JKnsOkCV72vZRFrHS99P8Xj5LWnqm2hytzLqWq3XLMznoNdhzK/T34cbrkoR3tP+VI jZ2nVJAXiXffky2YMOLc58PKs/QPz45xJ98uoGSIZsITRGwWQZF0zxqkeiedjzl6gCjG 3QAQsJJinSuq+3zaTnI8UGdHMo/HaJreVAOAt1U4lm62Qt8tFFabJHw6NjfxLUifTlmt ynsiLd7qOXIMMQpu+Cd4ejmG46Z//XV3uz7s67FYN9Wi92Jzx08i/myr6SDtFuvPpYjP EOqa2sshV2281n5tHqCEF5a7iekIZ4OAHEmvxjZBoUg49Mi2kp0kr85fnbDJDbwaWYqa jlaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=fSF2etOAOJVfywMBTtY1bdGxgcRVgU6JHAfCr3IX1yo=; b=QlIA/VTHdO3EzR1nf9ayD3bSfRxZxr0Bu+geVWHyaSZqj/2A0A8sxmYRLkK6nal2Eo 5LpFT4/Hgsq4dc+IUbcgedt97Qv5trilmfg7xmVROxMYZlZUUQKsRVrLNHUXti4j+DMt /AWUrkk+JRRrkbqpODsqqBFZq15Cp0PEv9H/vtx1v3dyx481RmclZ6xflY6CqJ9kNcPp tx7QZR/Ceqj74VSZMg0uHV7K1OkaleL6+pfYnmNdXiV/2bfK4GCHkidjOUpFS75CgAMp hu8sBA3QFvkFITuWdt/lpYksD2QzYPh75Y7Unuz2DOKzHFzU2V92fKUXAJuZF4vFql0I w7zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw36-20020a1709066a2400b00871d4e9c112si4989449ejc.616.2023.01.17.08.52.35; Tue, 17 Jan 2023 08:52:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231543AbjAQPxC (ORCPT + 48 others); Tue, 17 Jan 2023 10:53:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjAQPw1 (ORCPT ); Tue, 17 Jan 2023 10:52:27 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AE6B222E1 for ; Tue, 17 Jan 2023 07:52:11 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-268-eD-OPVowPHOo76euoQg45A-1; Tue, 17 Jan 2023 15:52:09 +0000 X-MC-Unique: eD-OPVowPHOo76euoQg45A-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 17 Jan 2023 15:52:08 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.044; Tue, 17 Jan 2023 15:52:08 +0000 From: David Laight To: 'Amy Parker' , "willy@infradead.org" CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] dax: use switch statement over chained ifs Thread-Topic: [PATCH] dax: use switch statement over chained ifs Thread-Index: AQHZKhj2H8rtmpwLA0eRPGwdtTlpaa6iwgdQ Date: Tue, 17 Jan 2023 15:52:08 +0000 Message-ID: <11f5a5ab96e143689c07531c9e5e704a@AcuMS.aculab.com> References: In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogQW15IFBhcmtlcg0KPiBTZW50OiAxNyBKYW51YXJ5IDIwMjMgMDI6MTENCj4gDQo+IFRo aXMgcGF0Y2ggdXNlcyBhIHN3aXRjaCBzdGF0ZW1lbnQgZm9yIHBlX29yZGVyLCB3aGljaCBpbXBy b3Zlcw0K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