Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1553563ybc; Wed, 13 Nov 2019 00:09:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyhotyFqZ04cVOAROycMXu8G5NGn1dmRoeUG6rlkIhD3vDQCEf5z2JQgERHmo1Bhs50tdWa X-Received: by 2002:a05:6402:38e:: with SMTP id o14mr2147493edv.285.1573632557678; Wed, 13 Nov 2019 00:09:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573632557; cv=none; d=google.com; s=arc-20160816; b=pIzyEPohs667SaT/IYr4pZGO0YGihTKI/F98EXrZ06uewsk/8DCkeGUXA4wDJPHPe/ KffZ/+AJ+2CtSAtj+0Iho5rbO3/M7C8GSO8abjcpsXxPKHioUUJjRGxPkK6X0cS2hapx d2vyA3ORsd3j3PrZB0AO+wC1KM+qrualmLsGYVXg5EFrlzqOmYTIzeBMMItAf6xVT6li J+PbcWWehl02UP37AyWntx7cnTG3iJP6+xTgomM+Nx3Y8yrXYFG1of+y4iR9Htr5QK7K qybHuJjjpQBDI+fB/RlKxxJ5p7KnqRqzW4tmmXSJcns6ZAzSvAIcjTesJ876iX/wmKjQ ojUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=r/fMeIkVi21iCxbzdp/QtDTjojD14k6gpd4DZsn8Mfc=; b=0DycOHPpo90/By8YhNWrWbRKMkExMhz+EoXXuOr20LF29y7xu705MyrEBCkuoQQlzQ kpUnhf8VWD9HLnJeBHoGLccfJXBWkGiD1HUKI3M41dZb75Nz0IfdweNnUmKFaeFlb3Nb ssk4EuaETkVaG2K1MoQYW2R5PsTKa4VNKTuDWR0zziu1vmQ3d9e7Az91Uz/JYnAPBAaV gQjPwl8dQbyHwIZrNhPjtxf3hxondV3OtRn8jWGiHSbojQR6dkMVTtrmzwdFmfR1Uq6T 2Vq+TD/kPD0gqVsEJWAWsKeVkqHrHqnK1BhhGgGeOlz8pzSNNvDCj0DhSDAmWg9pmjje UsjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Kia/RTbd"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z16si895097edi.241.2019.11.13.00.08.52; Wed, 13 Nov 2019 00:09:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Kia/RTbd"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726389AbfKMIIR (ORCPT + 99 others); Wed, 13 Nov 2019 03:08:17 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36806 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbfKMIIR (ORCPT ); Wed, 13 Nov 2019 03:08:17 -0500 Received: by mail-pl1-f194.google.com with SMTP id d7so744100pls.3; Wed, 13 Nov 2019 00:08:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=r/fMeIkVi21iCxbzdp/QtDTjojD14k6gpd4DZsn8Mfc=; b=Kia/RTbdDuikn8K2sIqQ13gm0tv6sDP07tY29CBKsGwKy97BoJsg7Fisv59LRmWi9S yBfqQxyHlQVknQDMTzD6ZEhXqWzVJV5j7u0jrvYH41wTM10AvlxQc7iF479JoRpX9oy8 0GZmrsb1tFYDlx0adGQfM4UkXqjIwnim+zWbpcvmP/ZL0SGxHRY+B31QAemUXBOOwLdu dJtKJzR0vxeZGDzirMjmYGj4KArYJnHurFwX4KCzTj9H1jJPVBTkcmGyQkiAfrFyfAk3 9d2nB/cSrsOjLt+32yllLHfrXLs9BaDHiJFMMxmhkxnJVPapOhq1OQh7xeh73a6GKdtS cDtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=r/fMeIkVi21iCxbzdp/QtDTjojD14k6gpd4DZsn8Mfc=; b=lYWvIL2MP/2oaBHRnxsFUFDV6fu3JW0MaGgK2gCl7klZhVPQcYnqGtZqWJdthey5XH FiNqb6IkdVHwjyeAll//+P0ZJYRW3Mp6dZCGnuJEBNrdh2BTKd/cYfpqgiARei7vcw3h Vtio2+uaQk/5H6cLmpTKvXNgMIsoSdsjzviTtYfmkhDn3pRaJUDzELsBZPgT75yHYKoW vDdRxtg/S4koeWqF6FgjeoMy3j5QkE/ozvAhMDGPQUnN6kDCqnr+CDoCejFu9LCtmqqf FDRfT3kS45lJwzOcc6lk9MGW9RHZSIZVFgTbhpFmzbrevBUcZuOGbCwbR2APx/ZGDngU sQDQ== X-Gm-Message-State: APjAAAVU9QBgIm4DlTM2KiAdU22ex71Q1WooDCTRZq1RlMVWvBZpDQrR VzdUQkzEKod7UBU+dQzxGRo= X-Received: by 2002:a17:902:4c:: with SMTP id 70mr2315305pla.4.1573632496113; Wed, 13 Nov 2019 00:08:16 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id em16sm1417281pjb.21.2019.11.13.00.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2019 00:08:15 -0800 (PST) Date: Wed, 13 Nov 2019 00:08:13 -0800 From: Dmitry Torokhov To: =?iso-8859-1?Q?Bj=F8rn?= Mork Cc: "Rafael J. Wysocki" , Heikki Krogerus , Andy Shevchenko , Mika Westerberg , Linus Walleij , Ard Biesheuvel , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH v8 1/6] software node: rename is_array to is_inline Message-ID: <20191113080813.GO13374@dtor-ws> References: <20191108042225.45391-1-dmitry.torokhov@gmail.com> <20191108042225.45391-2-dmitry.torokhov@gmail.com> <87woc4s1xg.fsf@miraculix.mork.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87woc4s1xg.fsf@miraculix.mork.no> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 13, 2019 at 07:52:43AM +0100, Bj?rn Mork wrote: > Dmitry Torokhov writes: > > > We do not need a special flag to know if we are dealing with an array, > > as we can get that data from ratio between element length and the data > > size, however we do need a flag to know whether the data is stored > > directly inside property_entry or separately. > > Doesn't a non-null prop->pointer tell you this? No it does not because pointer is a part of a union. > > And inverting the flag is unnecessarily risky IMHO. An all-zero prop > might now result in dereferencing a NULL prop->pointer instead of using > the empty prop->value. Now I haven't looked at the code to see if this > is a real problem. But I believe it's better not having to do that > anyway... All-zero property is a terminator and thus we will not dereference anything. Thanks. -- Dmitry