Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp619927rwe; Thu, 25 Aug 2022 06:30:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR7gin13Tg9VoRqIB+68DF+LIAI6PyzihUP+1I3zB4c2Ps/kYzDCuBQGddbw9EAmf+bF85Od X-Received: by 2002:a17:90a:de96:b0:1fa:e427:e18e with SMTP id n22-20020a17090ade9600b001fae427e18emr14167241pjv.116.1661434230015; Thu, 25 Aug 2022 06:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661434230; cv=none; d=google.com; s=arc-20160816; b=WGkqLVCHKjgXCD+03GmpsGSbiCC5HrCTJ5ppcrXLyXN3yzfmRnisooY6qTZNI6qXGt hBvoORE+/GK8j4f4DpBdTvB2Fqsq4llPpU27KFUUUrPHTfd0i4WlSeKvIYjJI+PaI1vQ YN99EoM2E2D5rPhchf0pr/8WEEwk9rws7XxEhcwiwtMBcNMLGsQPBCZlfyfkqmJiVQ4v AGCk5JR0iY3JzUDDsFPkL9HfDuKPO71arVHyf6ZZbe9ZElK2C5hBUSYIYBah49GccdIi +cd7iO4BuYOdPi0NBunryYXg+NtOEto5p9ikVNv2V1JBdsrDIwdH9zj6lOItPYwPFTee 0eWA== 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=xJ7IEV+n3O7/viRmViy9mdA/hgnsuCosJW1S1CyV5fA=; b=s1tmu2QCBIxnZSi9OjdsABk96PUunOLdTKm8zyR4GIavlyP/3JgWu8efEsx8ogu4ZH 12PvVeWKkmNAnqdT935StiwzkL6RwTsdbBSeDmPT9+b3xc0wpGYYLy79K4WAkioIpUr9 40dKGUylz7jymHjuAVUv1I/FaDXUGnfD3iSVvjdLn8lBXAe0EvHUzehgneuQGOG/2XEV MJNsvX0T4++xE/7ztxuWKqBHB1Z1p5Fx9jgoMmP+UdXsoxnSjCvsotfQ48e2/S6Yqx6D MmqmenwwIHzkiBkmvtQTR48m1xhnBo9O53nVRRnGpc3uvUwrbhbjWYkd3mFF5fUladci lHCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QAVqKLfq; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om13-20020a17090b3a8d00b001fb2f349c9fsi4185874pjb.119.2022.08.25.06.30.18; Thu, 25 Aug 2022 06:30:29 -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=@linaro.org header.s=google header.b=QAVqKLfq; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241502AbiHYMUG (ORCPT + 99 others); Thu, 25 Aug 2022 08:20:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240174AbiHYMUE (ORCPT ); Thu, 25 Aug 2022 08:20:04 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C587E4CA36 for ; Thu, 25 Aug 2022 05:20:03 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id w19so39189652ejc.7 for ; Thu, 25 Aug 2022 05:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=xJ7IEV+n3O7/viRmViy9mdA/hgnsuCosJW1S1CyV5fA=; b=QAVqKLfqac7dra/Hzx3cihnFU/AtqGuhjHVeWTEs4Z1eKZVyq52D1IVE0vT0VErjNz A4wWrboJrNMPLEMwR9Yk5aqNOFdiE8PZg0oFxro9o4grM1iRa7HmLhKn3IFaLkkzAhlX SSyw+Kwl/B4mK3s+aMGu8o4ix6hQrWbfU9/t7hi72+VbTXSdrNUuNKoRMBC071ouPZXl L2KIFCYvVFFnsAG89cC3YMU+Xk/riAvPL7klOhrByNywbHK49CdEhiNIOClHN+fvvzFf v9wROchb9Dt/Rq/Ua1hSd4h5hktQVtL0Gfxfd4UYB7ymGnyM/hXdbR2g80QsoGov8HPv U/JA== 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=xJ7IEV+n3O7/viRmViy9mdA/hgnsuCosJW1S1CyV5fA=; b=YpqMshf6K0J34GteG5Od9PxPaNgWUM0D3NCQC6BB7ZlO71Zl+YgAQW+2KwfNWDeRKx Q5GWcw5c9b4Uw+ztT6MQ2sRrpaNOwOZPJHNfdswxZ0zaqiW+bUoE+lCrizBU2K0F3wXP HU+91Xm/1tWBN7iPpGAQtBQfLkC5+B5f9Gar4ttl2OlyRMEQrGaoQfVB1/u6L4yLqufA pEVXzxRaOfy3/KEvgQggPS/VRGz6wLeLXstupYagtebhomOg7bnb/TyBqmh5App/I0Cd rrXBdZ874Q/gu6HZ6KW94tAM8bOtmY4KaHidGYBdztVv+7BbdZBw17jnIEmhGavChtAf Fusg== X-Gm-Message-State: ACgBeo3s/kc+d2UkwJbXqnrtj4ZQn/+tzn8QdlVwXB+FGx7HqSvSiBZK E0qpKOJR7SKQHj3f7ti7NRh6d9sbBkulGw3rzM8Ulg== X-Received: by 2002:a17:907:6d93:b0:73d:8593:9608 with SMTP id sb19-20020a1709076d9300b0073d85939608mr2380952ejc.203.1661430002346; Thu, 25 Aug 2022 05:20:02 -0700 (PDT) MIME-Version: 1.0 References: <20220816090903.19558-1-Will.Shiu@mediatek.com> In-Reply-To: From: Linus Walleij Date: Thu, 25 Aug 2022 14:19:51 +0200 Message-ID: Subject: Re: [PATCH 1/1] Pinctrl: Add in zero check To: Andy Shevchenko 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,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 2:18 PM Andy Shevchenko wrote: > 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? Dropped this until Andy's question is answered. Yours, Linus Walleij