Received: by 10.192.165.148 with SMTP id m20csp2123727imm; Sat, 28 Apr 2018 12:50:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZojXTuhVWFp+HafFj+ebau68R5bxxed0kuikZf+FRo+9T/NJkSL89BoB2LDAfaRkDURWAg7 X-Received: by 2002:a63:7c01:: with SMTP id x1-v6mr5917926pgc.286.1524945026559; Sat, 28 Apr 2018 12:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524945026; cv=none; d=google.com; s=arc-20160816; b=oYc1hPxZwBSAXVQnOjBukq6BfSwSFLFDehCgnOy6t7OGgRF8AfCd0/4EE7r3QkWTky U+2dz1GLDO5foj6ydHdRcOu9QvkWLivYnZIGhvCy5U/bwbbG8RhbZT7KWbGMHJ98e47y yqlP9YQ7vR+rUUMF8roQjqaXbxClTmid45PP1CSquQQJi+dELANmMx3Y/JWVR72yzWGG 0VkWKNuPeje/3aNp+HcWPg1h0iOMQYE2QYRnOMPAEqgBwsGX2mG4twtqgQKxMV8VeNp0 NP9yziW5BhC/9LSMjAH/u5ioOMAsoJ7ZCBYkicADAYUSvcTHzxtUaUVubRuS8TIcYTfl K2rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=r3JphA7u8INjNkuXEoEGR9rlcI2WpuVrRJ/U0oYDrZw=; b=YsSHDlrOztVnzaVrcb4oQaXKoHCzRg2u46ABnwpqlhXWUzGbEqCgNgYOC3JhGsZ4iY +OR/2FVRGciaVXuQm0/xeq118rJa6Ne0nBG45i0y8TScaymNW05KPGa4ihLU7L8aPg/L r9lDHd9Crp6Xn+hkzvvZSvxDv7ioebnAHsr8koLp2Knq4SMOrgDrqKcXv0gLysR8yuGD xfRAicwZ7OMsUUPx4R5dETMSBi02whRwd2BFFMK+c7A6aHcE1rcjt28cW8wzvAr81OgL zQ4Yzdy8dcA0t886zg3swrJZO+uwcIkB31P6QTP+VNR/8bDBQf1nSTHf6biq9dhlfNUI 3NhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ksg5uejr; 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 i7-v6si3718117pgf.521.2018.04.28.12.50.12; Sat, 28 Apr 2018 12:50:26 -0700 (PDT) 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=ksg5uejr; 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 S1751530AbeD1TtF (ORCPT + 99 others); Sat, 28 Apr 2018 15:49:05 -0400 Received: from mail-yw0-f176.google.com ([209.85.161.176]:42192 "EHLO mail-yw0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751245AbeD1TtE (ORCPT ); Sat, 28 Apr 2018 15:49:04 -0400 Received: by mail-yw0-f176.google.com with SMTP id h6-v6so1637880ywj.9 for ; Sat, 28 Apr 2018 12:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r3JphA7u8INjNkuXEoEGR9rlcI2WpuVrRJ/U0oYDrZw=; b=ksg5uejrh2swbbNqC9oM2Kahx+uJiocns0bVaN2cvydLfigR+OhZIGqtTAwLv9D3zS j2eUAZQV3Fl4CCXHM86b3y7lyJ8smx86Ixqa6uHZBWVSatHJ0PfDystRhbCI74Qdw9y9 zGySpMT0dU/rasGiHnVRfWUvfqZweSeq3fp4FpbEM9U+nwlqueAquhNnS0qod8Hm2gul O965jG2Nf6FKVQwG6jGJUiIj5A5lIgzOF47s3vo63W+F6vDagB8jRT/V3Lc4wACJadti yMFElMnSQe49zm80jWYrJqVcMeg+loKM4ARNMe5en1pFehg7PvtTdMVYfezYz0qFyBmw l7oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r3JphA7u8INjNkuXEoEGR9rlcI2WpuVrRJ/U0oYDrZw=; b=treF34QbRLcezLv1eUr8Edg/BEjpt8o/j8xdgOLWZs2hbYrpydNF9DrYqSXySjtast oDm15TM1IMcWda27PJLaaRE80eH6Ovzwwl8WaNbeXD97+q6kxdTXrhPquaQWps3H6AKJ UP0QCkyIZeeVtGP8rdroNjPctx04scaO1b+npV0j0IQCbNkaNums/2HH/wjCmmGa0350 X2JUq+wRODGU8qCy2bRYGc15L0uWTHrUHljZWSLTFZgnB3MO89NxcRvU6yPtfG0GKF2V 22sWR5iUTavJhzCnfxA1e8MvkrHV+lLZYo8xw+PTZ9J1+MhmurMTEXSkfEfvcF5LU9jI yxIA== X-Gm-Message-State: ALQs6tDVZnAfjCvJ/vTqcH5xWgtvsIAneq3kHlail/mv3uEOw0tOQj0m 635PtcAaj82UOhWqcJ1yO41+q/nnllweHtrPQFw= X-Received: by 2002:a81:ae1f:: with SMTP id m31-v6mr3553166ywh.412.1524944943922; Sat, 28 Apr 2018 12:49:03 -0700 (PDT) MIME-Version: 1.0 References: <20180427155851.16402-1-mika.westerberg@linux.intel.com> In-Reply-To: <20180427155851.16402-1-mika.westerberg@linux.intel.com> From: Yehezkel Bernat Date: Sat, 28 Apr 2018 19:48:48 +0000 Message-ID: Subject: Re: [PATCH] thunderbolt: Handle NULL boot ACL entries properly To: Mika Westerberg Cc: LKML , andreas.noever@gmail.com, michael.jamet@intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 27, 2018 at 6:58 PM Mika Westerberg < mika.westerberg@linux.intel.com> wrote: > If the boot ACL entry is already NULL we should not fill in the upper > two DWs with 0xfffffffff. Otherwise they are not shown as empty entries > when the sysfs attribute is read. > Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") > Signed-off-by: Mika Westerberg > --- > drivers/thunderbolt/icm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c > index 2d2ceda9aa26..aec6a82989d8 100644 > --- a/drivers/thunderbolt/icm.c > +++ b/drivers/thunderbolt/icm.c > @@ -1255,7 +1255,7 @@ static int icm_ar_get_boot_acl(struct tb *tb, uuid_t *uuids, size_t nuuids) > /* Map empty entries to null UUID */ > uuid[0] = 0; > uuid[1] = 0; > - } else { > + } else if (uuid[0] != 0 && uuid[1] != 0) { Maybe || instead of &&? I'd think it's enough for one of them to be non-zero to be a valid UUID. > /* Upper two DWs are always one's */ > uuid[2] = 0xffffffff; > uuid[3] = 0xffffffff; > -- > 2.17.0