From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C69483769E7 for ; Mon, 8 Jun 2026 21:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780953167; cv=none; b=ujnI9kJ587V/ycSPfuw2MfhQvf9J6n/A3R2+h2fa/h8vpw8H1nXw7f5JQLcfnjWazTHhmWqUFiGyEBm3PP/rbQDin5of00oflDYiVRbMF6Y0Odl8X217a23aLHYbXBI6XdkeLF7/W21kY3EgPfB3b3UgYepcgA6XY9iSzOhx5S8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780953167; c=relaxed/simple; bh=/dDJhPAp4t8jC6JnOZ0T5+LBTRZzwH71aG/QRIYVYCk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GOzeeaiig3IjP32l4YRxsAQV4iz+n5/+02XGmP2W8oW6uxfYuOSBtCudrCVTNrooMzEtaM0eF4DG4ow6cTfS96u3EfLvQQHQLjTo6v5/jBOL1DIW/zYRkwJnEhotgP2klQJYzvqP8ELiJKvLbkHF0S0JqrKWhVuhnBMOB/9RW0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fb3rmHFb; arc=none smtp.client-ip=209.85.160.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fb3rmHFb" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-517b1f2c668so19168391cf.2 for ; Mon, 08 Jun 2026 14:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780953166; x=1781557966; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jk6wvecdef9MHqikkKv1P+MsWKZj9/3WmJuT2QnrkzA=; b=fb3rmHFbM5IJ1AgiLK/Rkmd6/uGT/dBNE0ONEErlHkDTo7gRnn4mISYwuDilNuQc0X gHDTUvMT6L6h0TMIoVYA7OdlF1M1uo9Pw5LJiKyahX4LSlQk6jCuvwgkySPGWDGT9kSn iD5OhGfSqYHVNMQvOi2JrCJPP0TYzWiIwUb9LqLsWzpzzgV/PMoEs3GpFIhDz5FC3Dru r6Xx82ryxv0amrfnVPeZN22WYq3RuhTC3NaX6VuZOVdZS66qwc2K9AOIYvOdRJTyGGwm Ww5ssqLYCQHi7vyecehsM0e9wl66FnM38j8jKSywwjBU7Vs47qU168Wbxm3oRiRWAWV7 VqIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780953166; x=1781557966; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jk6wvecdef9MHqikkKv1P+MsWKZj9/3WmJuT2QnrkzA=; b=S3qPr8AWUmDymrifEjZjJDlpj6DG1l5UU+Fbspw6LNtG3rjwhOFsaflpyCbl17tTjw pdngSR0TZBGtjFI9qnwyGD41TzSKZDZbEGgaAcH0sxoWcroN8QYNqTcXGWLiB4yr04nJ sprsqSx2xXZskmIzBC+IMFrZxMUsrljgqc6aKlSKLag68Lrk7V0dk0m+46ebOy+T8Wrm CKTWl/t4N0Rov/0NFQr7RGCPAQxLyriQSxCLj8Fe4cJZEeI41MTKQkPIUhvi/CtsFNQl ATeyNr8qcf8IFf87qqcZ35/UglmdeiStSoeYtKSjNPcTrlSi7dfJyFsrLEpsu+Ej0q7c pTHg== X-Forwarded-Encrypted: i=1; AFNElJ8L5HlSUWzAU4MGFNSBadV4Kov19CTzXSzfjorzpd9YX/9xdxLXYQ91yK4qrr7hqkUeDrVR0jYFMY47o0g=@vger.kernel.org X-Gm-Message-State: AOJu0YxDpXIIHoEAdzy/oo7WUivN9iJHvUzGusF65cuZMy+Z/Z5oVhHN a2MESWY9Q87/w/X1oPVJf2hJwZ4mYFrj/YI9x8y6PV9+7vBbxhMH8u18 X-Gm-Gg: Acq92OHm3Nvc/PdgprJy8PjvTGOvs2hW7+H/W/Khp8bAtWQrQucLn3Y2wM8mLpmKXBD w9YcIEcZPDpuIEwwv3+U+u19iBCt6QU8vTppD2ifFPETq3NgtnmNTy9zfCrsR+Qo1S+1XRVPrhk ZiAklTgjDpVGb4J6vzCnjSISZnLl4Dpy9PHRtECD7b3sxaa6l+rNRospf2l1zvygx2cLaxvslqK a730MC+NJzCGfKfApb1fzXkGv+UrT83BsyCuAwLXh1MJB5Q65EgkdsNvD9oe1jrFAFocoFBvrSq 9QrAmPsaKe6Zw/VCn4UbKY3KbW09DQMhmy+U+Gp5hM26nQR7wlAALDm04mgjpyU+tngtR15YBmq N3ctF8WFZktYNZJE0yA1AVFdgOqnsTS1kJU6NiKp0TEb7QYqAkuQXqY4/acb1pIVDbzjP+An7XT bNq6gKdYfzgEGrLRhrot+twVL3qXnSRRj2McB+FKPkiYcgUuBwxsKuUWmX1IrE7W1g/eFrQJbEv olr3KJEVD73I2JL X-Received: by 2002:a05:622a:5b9b:b0:517:8011:3a4b with SMTP id d75a77b69052e-51795afce80mr226980791cf.21.1780953165682; Mon, 08 Jun 2026 14:12:45 -0700 (PDT) Received: from [10.69.76.104] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51775d8161csm166385001cf.17.2026.06.08.14.12.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2026 14:12:45 -0700 (PDT) Message-ID: <85cb68a6-7bfe-468d-b19a-5e9ff573501b@gmail.com> Date: Mon, 8 Jun 2026 14:11:09 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drivers: base: Remove statistics group if encryption group not created To: "Ewan D. Milne" , linux-kernel@vger.kernel.org Cc: "paul.ely@broadcom.com" References: <20260519191840.1030912-1-emilne@redhat.com> Content-Language: en-US From: Justin Tee In-Reply-To: <20260519191840.1030912-1-emilne@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Ewan, Thanks for bringing this to attention.  So, I have two comments: 1.) In the err_del_statistics label, should we check for if (tcont->statistics) and only then sysfs_remove_group(&classdev->kobj, tcont->statistics) could be called? err_del_statistics:         if (tcont->statistics)                 sysfs_remove_group(&classdev->kobj, tcont->statistics); 2.) In general, if the tcont->encryption sysfs group couldn’t be created, why would we remove the tcont->statistics sysfs group? The tcont->statistics and tcont->encryption are independent of each other.  Just because the tcont->encryption sysfs group couldn’t be created shouldn’t mean that we need to remove the tcont->statistics sysfs group too.  And, clean up of the tcont->statistics sysfs group is not lost.  When transport_remove_classdev is called, the tcont->statistics sysfs group is cleaned up at that time. Regards, Justin