Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp912462rwr; Wed, 26 Apr 2023 07:54:44 -0700 (PDT) X-Google-Smtp-Source: AKy350bsHmrclTGxBdQF3Ge/FdX4mG2YYqYOZSPaisdCzabzh7o5ukZfQhFvEWzpDQbOgTVcW0VC X-Received: by 2002:a05:6a21:6da2:b0:f2:abec:709 with SMTP id wl34-20020a056a216da200b000f2abec0709mr22518942pzb.18.1682520884372; Wed, 26 Apr 2023 07:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682520884; cv=none; d=google.com; s=arc-20160816; b=B2rIOee9N8jE/n54EIKJ87BHi6fmmEVZvLRvAqIapH1601LflhUFZNbzniSQZW46X3 ONRSk8jJsQAeakvyP6H50Wz60ZB0/+53EY4B06y2SpWlaD+SefT1f4dzMC24v420af3y huLWMb7CzdHIM4afbnjVobCgRellgHEmKaJ0aVNF99wup94/2FZGPizN8+W6N8Y2K7/o iU3tRpvfTC64dde21Nyb5VZ6JSQItcAVMfFNIxbeGNjmryyLwlCIOA1RD/cSMvyennm1 6zeRKCLXNUjBvoq/035nX4nlBtP+OHvfidNTtWq5IWmYA926Ag+BGW/Akq2L7OgJl5oK HVyQ== 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:date:from; bh=NBG2lZlsUKJ8RxH3OaOmiXjczDeNAAyyvHlXT74BqBI=; b=Gg7aVtN29+wX8fNe36xRSBSrUMTke99BZc0PH5oZradueO6/zIti8afwkvZBGal+YW LFsRSi9H/fhfqSsUgc9sDiuUdtrSCY0D26XcZviyKbWq0frVPdkn5nCMHpe08Z2RB3ux BD7H4EyBGc1xM2M8kgjf3r86exwfTAgqD4i6NIDsCP4m+c2wwc3dGTFOOk1kh4aFiQux RJQPznqmJLP9gC7aJlOmv/lg7rhwHElELxBjhQHkpFGdOqrDSInNFDR6oPmalCbWzxN3 tg80br/t0+cXcdrZUJjAE57FsG9U55SGX95HWjnOhIyff373IujBfLHSbGz00A1H63/B WHEg== 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=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 j73-20020a638b4c000000b0051f2183c68fsi16506840pge.333.2023.04.26.07.54.30; Wed, 26 Apr 2023 07:54:44 -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; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241276AbjDZOmo (ORCPT + 99 others); Wed, 26 Apr 2023 10:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241146AbjDZOmn (ORCPT ); Wed, 26 Apr 2023 10:42:43 -0400 Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7D172703 for ; Wed, 26 Apr 2023 07:42:42 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id 9869c317-e440-11ed-a9de-005056bdf889; Wed, 26 Apr 2023 17:42:40 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Wed, 26 Apr 2023 17:42:40 +0300 To: Yan Wang Cc: linus.walleij@linaro.org, brgl@bgdev.pl, "open list:GPIO SUBSYSTEM" , open list Subject: Re: [PATCH v2] gpio: gpiolib: clear the array_info's memory space Message-ID: References: <202304232146.7M89pwCz-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sun, Apr 23, 2023 at 09:59:43PM +0800, Yan Wang kirjoitti: > if hardware number different to array index,it needs to clear to points > memory space if the array_info have been assigned a value. Can you explain a bit more what's going on there? ... > if (bitmap_full(array_info->get_mask, descs->ndescs)) { > + /*clear descs->info*/ > + memset(array_info, 0, sizeof(struct gpio_array)); > array_info = NULL; ... > } -- With Best Regards, Andy Shevchenko