Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp555055rwe; Thu, 25 Aug 2022 05:26:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR4NTDwoabKNWYaXhIbEAcOSIPg9nDnC3o9NAEWkhpE2BT8eKjPC/At7DvJs4omo7K7Ect7l X-Received: by 2002:a17:902:904b:b0:172:cd04:a3d3 with SMTP id w11-20020a170902904b00b00172cd04a3d3mr3669113plz.173.1661430360861; Thu, 25 Aug 2022 05:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661430360; cv=none; d=google.com; s=arc-20160816; b=FeSiVR1nbHu1qY3yD75yKXSLtcu0gtp8tAyEI4IjibwBlSvJkhdXYsIkI18aNayrDe 6Vg6DipDenFmX399C6wzmwBvmurSkNNWz0fSObQID0WvG0VzPHa0X4EuCxEU/z7yhLU0 +/a25vD4AsD6PuJJ/Cn32FIPJpRHsvd3Plfrztemq97QWqnt7SAbPk/uiRY9bMMBiBLL KSCDAJpQb/uIThVMwU9UQRnOnUFLyAlS3QoW1SJZO96kKCEaxp7ThfxqZr1w03xh7Rvg 7ayzoLJfJo9xJhiQBFoX9qLdWJW+LRt/gSg5IumSovI7UV0HDqHbltWSk2EBhVLVFXpl e59g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WBcITNJBSrLnWAUXSign9aduSen7RhKmozXyR+8rTuI=; b=vyxROxLt9OpK9e6syzQGRK2iNMLHjbnCYhTQgxSb0LMZKKEWUVhJZYRcIWAMB4sY9m b9Ha4WDqm5AK4NtLU6E66USLXW66ZXRqKGQ08Py3Cj3oQ2/9DE/NgsZJKSZ4T+QHYcvP gqspSOjZys5omfq0bMV4C6/GCvsKGJ55O7NJ9+o1yeffLJMBuKuZ+6B3Gg3jxE+GLM18 8kHfg5mW9blfg2A1OlPIFFtWrcjM1U5OfW1KRenbz6m/KG0I6FBWjii9qLl/G6kfIcbF mPwzUCRtcSVI1vLxuNC3jJcKQS64yonC395FvFdeCf1PMdG4ZcmiXr1rHsp1QNjHXUvj TAlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CLD3X2uN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k17-20020a056a00135100b0053549ef1b46si22377930pfu.331.2022.08.25.05.25.49; Thu, 25 Aug 2022 05:26:00 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CLD3X2uN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240934AbiHYMSE (ORCPT + 99 others); Thu, 25 Aug 2022 08:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbiHYMSD (ORCPT ); Thu, 25 Aug 2022 08:18:03 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49E32B08AD; Thu, 25 Aug 2022 05:18:02 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id l6so563226qvu.2; Thu, 25 Aug 2022 05:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=WBcITNJBSrLnWAUXSign9aduSen7RhKmozXyR+8rTuI=; b=CLD3X2uN00bHSFMcKrgvXXYVx6qG1NnVFgY44zQ31UMpvVRKgVfi5LjI2cnTUNWPbG +lsVcEdavbIWxHjOPZV93IqxtKhpbYBf668aREfvWAUtMhlmMmOdI7ailjgmvJujpRg+ 8zIye1N99yJUDc+HWHFirPUwXTPZnW6k5viLvCFSrWI6Hc5K1mi8AmKY0a2Hpr6wd9Kg 56OBb+F3WcQXp1VxQHhowpuD3C351pP+FThyUc6KKzHf3VrwD02FfoQFplxNJXg0yT/3 KZHz+bQw5OKsw2SNp2KxF/Hs7GeM0fg2e7oISxEee2OucU+xtryTUp0CMtzR53vacPce hbqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=WBcITNJBSrLnWAUXSign9aduSen7RhKmozXyR+8rTuI=; b=5WiXzeV6K7VBgUWgi9Rr80FVNVj2CaJ95UsQf1Jp52AlEA98P3b3XLHPwMGDPE07Wn /Pi38uwFPx/gJEtvgeDrOpA8/E2w9DHjnubSjnHo9rW9br7w4RknmS9sE1Ny1LfuygJ3 Kl7/7nT/Xw1el16/feFystX9bnX0iE1ecAtT3gZk0X18nkNMpqY9/Or+AK5wBU2A/462 DKzUyqVYYo+iksrPYAIKOKrTO06QY7NB9/QgFg7jWqrGJt1IRx9aZmVJuOm23o2Ly5hB mRGIt+49H3BpChvGfQI28bf3IVkVBV5QcxtO5VxpKIRKPoP+IVLB25ShBj0W5lbXliu6 1huQ== X-Gm-Message-State: ACgBeo0DDuvcnHZ4+ggPuiGl09MJ4kG93bKelIDw0XY0x+cXejCVImFc NAd0nSi1GwFHMzuSIcZtS5k+bia3HdO0Pn2BRM0= X-Received: by 2002:a05:6214:c22:b0:497:10a8:3067 with SMTP id a2-20020a0562140c2200b0049710a83067mr3151644qvd.48.1661429881414; Thu, 25 Aug 2022 05:18:01 -0700 (PDT) MIME-Version: 1.0 References: <20220816090903.19558-1-Will.Shiu@mediatek.com> In-Reply-To: From: Andy Shevchenko Date: Thu, 25 Aug 2022 15:17:25 +0300 Message-ID: Subject: Re: [PATCH 1/1] Pinctrl: Add in zero check To: Linus Walleij Cc: Will Shiu , stanley.chu@mediatek.com, Matthias Brugger , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Mediatek WSD Upstream Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, Aug 25, 2022 at 3:07 PM Linus Walleij wrote: > On Tue, Aug 16, 2022 at 11:09 AM Will Shiu wrote: > > > add in check of buffer offset to avoid the exception when input 0 size. > > > > Signed-off-by: Will Shiu > > Looks good to me, patch applied! Sorry, but it seems the author didn't pay much attention and didn't really work on it. What does the < 0 comparison mean here? I would ask if there is _real_ issue with the code? What is the use case and why is this check needed? -- With Best Regards, Andy Shevchenko