Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2883872rdh; Wed, 27 Sep 2023 16:19:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9U44q4SafMedO9tnZZqx8oiwjE2psJJTX/28v29Wn9j9+sANNuoY3dwRGu0y1pvq5F3kV X-Received: by 2002:a05:6a20:324f:b0:161:3110:bbc8 with SMTP id hm15-20020a056a20324f00b001613110bbc8mr3206255pzc.36.1695856776048; Wed, 27 Sep 2023 16:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695856776; cv=none; d=google.com; s=arc-20160816; b=COtq/Lk0MPpWMgAMgc/s2gpPx4Ldnsc+HmfBFXLqzRuJlc4NygqBQ99N8dUOdm4VCz /H+7AvVEPhePi5AiKrq9ZhgV4QjtAgQWglB9knRysN89oTgE0zjdxgnM5F21Cs8lmQQc 4cD+lZ1fMwwKdtPB1csmUiMkyc9W396q2oLgXMv4uo99Wdl/VScYRWxtfCs9bNidBxtN HzHBXn8/xBUiWFKTdmshFQ7+WekTiBL7uY4kD/pVwYiQ4Qmw06Eprh3s3BqA+PCR2ZQp VavAebn4R7qcwEP+q3FMORlwKuKqqqTUCmmEvV7l9TKUIiapbcStLXmjQPNOB2+QAm/R 3Z+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=Sm0zxM7O/i60NLNvSviHQemdaF2HDOm/QoewQiI0zbk=; fh=I0KZNPT8TFvo2GHz93JgRCvgpts8uuRoJrnPXd4O4vE=; b=eHupdjOTVjDwWu+BrEYSMCt/05rbT988FmYJTSPzRj3/cMgzhsbWW5Xd7m9Oej1KFy e3yNd28qNkWP7m9ag5l2k327HnnAKlZi9ZutBP2ua1+uRzTZoSubrYFVk8K+8aNei6dW 94xttEB8+KJXOy1QZIGqatbVXxlJIrlic6nvZ3QNua8paVQ3c+VT8Nas0xuoL+/0MGm0 gUoQ+LpgtJ8cB3oyBW8TZKfPnnursGwdITBT7n5G5HsZ3MvG83DkdEy2qMF6sbNdUe/0 1czVpops0RG7fWZGZlRQR0D1kihy81X5EGWhne4xVfhZhtJbZYWoTJsVd6s2gQ/GSiXZ eFAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=fTk8Ubev; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z19-20020a056a001d9300b0068895dea43csi16426027pfw.78.2023.09.27.16.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 16:19:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=fTk8Ubev; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1CD1C8040C4A; Wed, 27 Sep 2023 04:20:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231403AbjI0LUb (ORCPT + 99 others); Wed, 27 Sep 2023 07:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbjI0LU3 (ORCPT ); Wed, 27 Sep 2023 07:20:29 -0400 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06D6193 for ; Wed, 27 Sep 2023 04:20:26 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C1DA624002A for ; Wed, 27 Sep 2023 13:20:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1695813624; bh=Sm0zxM7O/i60NLNvSviHQemdaF2HDOm/QoewQiI0zbk=; h=Message-ID:Subject:From:To:Cc:Date:Content-Transfer-Encoding: MIME-Version:From; b=fTk8Ubev8wyyua73JyBC7Cfn5tUJxtndrUQsmwP9rPLqpYUG8Kph3NaNU2X8dWR4z oeCM76ryDnQXBVUH5trE1mBrBSmrX+bNbdGKEkq713nit+fdCCKmR2cb/Fei0usOGs aC7VbhQVqQ8H9MXxCdTftzyR+yO/JQDFwXz/GzpxWLlJdZcHVSq/SL6G+E/sXksYPk aLqV6v4dq7urAAdBTtl/IQ2/qKXHiLDqeT9bqO/i1DUQ02czacd+Nt2rrR3XGQGmos 4d++p636yDmStwvdWp0fseWzAzmqDASt0sGnjh42WQpeIv3DoYrSQuN6B64wcA7RRv jHSaMJ4FAhaVw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RwZ0R6m4qz9s2W; Wed, 27 Sep 2023 13:20:23 +0200 (CEST) Message-ID: <137ee9ed434fe98fd773cd27895afc564f92a23c.camel@posteo.de> Subject: Re: [RFC PATCH 2/2] hid: lenovo: move type checks to lenovo_features_set_cptkbd() From: Martin Kepplinger To: Jamie Lentin Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Date: Wed, 27 Sep 2023 11:20:23 +0000 In-Reply-To: References: <140b721bc345a846863a37ebf17c3174@lentin.co.uk> <20230925102302.13094-1-martink@posteo.de> <20230925102302.13094-2-martink@posteo.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 04:20:44 -0700 (PDT) QW0gTWl0dHdvY2gsIGRlbSAyNy4wOS4yMDIzIHVtIDA5OjE5ICswMTAwIHNjaHJpZWIgSmFtaWUg TGVudGluOgo+IE9uIDIwMjMtMDktMjUgMTE6MjMsIE1hcnRpbiBLZXBwbGluZ2VyIHdyb3RlOgo+ ID4gVGhlc2UgY3VzdG9tIGNvbW1hbmRzIHdpbGwgYmUgc2VudCB0byBib3RoIHRoZSBVU0Iga2V5 Ym9hcmQgJiBtb3VzZQo+ID4gZGV2aWNlcyBidXQgb25seSB0aGUgbW91c2Ugd2lsbCByZXNwb25k LiBBdm9pZCBzZW5kaW5nIGtub3duLQo+ID4gdXNlbGVzcwo+ID4gbWVzc2FnZXMgYnkgYWx3YXlz IHByZXBlbmRpbmcgdGhlIGZpbHRlciBiZWZvcmUgc2VuZGluZyB0aGVtLgo+ID4gCj4gPiBTdWdn ZXN0ZWQtYnk6IEphbWllIExlbnRpbiA8am1AbGVudGluLmNvLnVrPgo+ID4gU2lnbmVkLW9mZi1i eTogTWFydGluIEtlcHBsaW5nZXIgPG1hcnRpbmtAcG9zdGVvLmRlPgo+ID4gLS0tCj4gPiDCoGRy aX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