Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5288804rwb; Mon, 31 Jul 2023 23:16:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUpDHtrrbZ8bSPbFvA5xSGQGP/6eiHAsIEs5v2ID7xAO66ut9B4VYnY+JHTsAtRob+zG2j X-Received: by 2002:a05:6a21:4889:b0:135:6ef6:171 with SMTP id av9-20020a056a21488900b001356ef60171mr11739441pzc.39.1690870566713; Mon, 31 Jul 2023 23:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690870566; cv=none; d=google.com; s=arc-20160816; b=LP9rFQ9XPCnYBXQZeph/PBH8Z9+1k+IxPQKyMMD6Z8+WmQiClG9qNoBg4NoUo/7Fhq busqpWajDCnSN/xczPgA4JQBuZLFjRphOVHazbZ4NaWVM61f93dPcvxMEXqnzMv/BLZD Jx7rrzyeX+af4nll/9gZu03kBoykQeHMjhjuRuB9JaZAfUWbCwAuszYPTII8JVS61ICB eJf4SZSu3/M1duzaPvcU2SWVY1ad6/bglsUhQd/SO9k9V4EMO/jn5ugXSa8vLlfs8Nzm qE/5crrWNsqaoTc9tc3UFO+BnQ2wiLa0ZduHAAlz4J6A8lAi4DlGfsYziwaOzCa93yiH yd3A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N80uoosdDa7yvdA2hpRb8uu5HD+aBTdak3hppZUjvME=; fh=erTgSetmbpeXd+hbGkT0bkTO0zm01ioHhSfeYUPyleM=; b=stWCo4MHKdFROf97Fc/SpwxxJb3T6uO/KDKqcv38qLYXZgPtmGziuiYw2h+Zmvcen7 LXQaRJpoSERPRMZ5FpAI8ji2rX4FIMWVr5sRA3m2RgUQe2w3Ote+86tho4k0NWOtpQWf TusiLcuIVpsAYhjy2kd9k+CUbT5fMJA6P3libVHCt8nkViNraVtofc0yhvZxfzhR6mOw /S+d2J+7hO0/Lmt+SRoV6dEvs0hKrMTCqZiQMlEijHa93j3mfnDIpNVz2p5tu0sPU1BJ qPs1KXNsaOhvvoCfYKzzrf4gfzYZEfPy1PEbNH0Kr6VYJgzCyLPQfbhqp2g8Slwx3OmV i9kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W81z5LIv; 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 fa9-20020a056a002d0900b006870c1ea846si7001323pfb.281.2023.07.31.23.15.54; Mon, 31 Jul 2023 23:16:06 -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=W81z5LIv; 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 S229946AbjHAFym (ORCPT + 99 others); Tue, 1 Aug 2023 01:54:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230462AbjHAFyl (ORCPT ); Tue, 1 Aug 2023 01:54:41 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187711BC8 for ; Mon, 31 Jul 2023 22:54:40 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fe078dcc3aso34126265e9.2 for ; Mon, 31 Jul 2023 22:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690869278; x=1691474078; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=N80uoosdDa7yvdA2hpRb8uu5HD+aBTdak3hppZUjvME=; b=W81z5LIvTNakNfnLI9h3rRYOTVhxMuXypfc2ZPp23NYR4TBHZZIZ6FC2WY5K8qM0v7 c9KtpjQEzbz03YmYXSu9sfaMCIXLovw2AYzmSNAagTnDxlKdSCOjUZdQi5mOIom5iTnt SYbmdG3PHq5eH2hSykAFJ/EHcpvNEOppuR5pEYZ9CgxjPmyAlrUczgYGxu1oyEEyIpYd KH0urdQDlL+Y4r4OFB58hK9UNpFplEmNntMwJimg6KV3FGWu3tFYyMmC5VV51rjYxWHn ApEfWU7lB2Q5bcxJ97ooXjZcsz6kHxi/QhZybjhi91GsdM/L09iyus+govgCNBVVdhdD DroQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690869278; x=1691474078; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N80uoosdDa7yvdA2hpRb8uu5HD+aBTdak3hppZUjvME=; b=Bn/HWBoAEjKHCeYo6Yj3QVBzfCl+20foXeW5Q047S0cBpwwZYf/QPGTroG0uiRpd0G gQ3aKhiQRQVNtdQU9tSIt0/TZdYM89xs5JYZex/TCd/NWrQPlwDcxjyc83vHe2vFofCA JrD/5zdGGxvDCaaPztZdJze1RlnmnpxVjZ1pFzboimFNNLRuT3cwLJdbldZlR6cEmB4c 6vgvzkeWt60ZfsiqNvx7i2vF4znT1rALR+/ksaoljHEY5CeEHIR9pRBmC3VFP2MXWmj3 yx1cQp27Bw2ClDHggCKGoBj6yBBXFkf4Sz9nG9hZSuVoRLssjj9sQUQi/kWtvhmUR6kQ 8oQw== X-Gm-Message-State: ABy/qLYoIw6Xdgd7dVqJx5xRt32y+q/Br5iCYTOvsOEK9p/sJel2jOLj w19EVu5YMZP2c7BgrBCAG5tjJw== X-Received: by 2002:a7b:cc88:0:b0:3fe:1d13:4663 with SMTP id p8-20020a7bcc88000000b003fe1d134663mr1535750wma.1.1690869278559; Mon, 31 Jul 2023 22:54:38 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id m8-20020a7bce08000000b003fe18d03188sm7679010wmc.17.2023.07.31.22.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 22:54:38 -0700 (PDT) Date: Tue, 1 Aug 2023 08:54:34 +0300 From: Dan Carpenter To: Jorge Lopez Cc: hdegoede@redhat.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, thomas@t-8ch.de, ilpo.jarvinen@linux.intel.com Subject: Re: [PATCH 2/5] hp-bioscfg: Fix memory leaks in ordered_list_elements_from_package Message-ID: <0f8c1b87-e211-4ca7-bf92-8fde5bb77cd2@kadam.mountain> References: <20230725220056.25560-1-jorge.lopez2@hp.com> <20230725220056.25560-3-jorge.lopez2@hp.com> <77867e93-7785-457c-9e37-4b41503bb509@moroto.mountain> <2978ca9d-fbab-45b1-8d90-321fb9453965@kadam.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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_BLOCKED, 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 Mon, Jul 31, 2023 at 11:35:35AM -0500, Jorge Lopez wrote: > On Mon, Jul 31, 2023 at 11:16 AM Dan Carpenter wrote: > > > > On Mon, Jul 31, 2023 at 11:03:42AM -0500, Jorge Lopez wrote: > > > On Thu, Jul 27, 2023 at 1:21 AM Dan Carpenter wrote: > > > > 134 int value_len = 0; > > > > 135 int ret; > > > > 136 u32 size; > > > > 137 u32 int_value = 0; > > > > > > > > It confused me that it's called int_value when it's not an int. Just > > > > call it "u32 value = 0;". > > > > > > The variable is named int_value when it is not an int because it > > > stores the value reported by ACPI_TYPE_INTEGER package. > > > The variable will be renamed to type_int_value; > > > > Eep! That's even worse! Just leave it as-is then. > > Oops! just send a new patch using type_int_value. Should I change it back? In order of preference for me, it's "value", "int_value", and "type_int_value". But it doesn't really matter. I feel there were a couple bugs like the size vs value_len and re-using the iterator. You have addressed the real problems so lets not worry about variable names. Whatever you pick is fine. regards, dan carpenter