Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp220914lqk; Thu, 14 Mar 2024 00:39:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULLWMXy/66+poTNtB+cEm0JHnXAAt6rgcEZSVM4Efk9fomYDT/HWRfldPNQDqd8hREtfxLxjNGGW7aV9Jmj000fCyikJVuqCa6pABl0g== X-Google-Smtp-Source: AGHT+IFU3TN9ZRFS9hdmgaEjDXl54BMf9hBhR25MitpF9oYqY7bV6upnRj/2eDeQMC2bj3gno+d9 X-Received: by 2002:ac8:5f8d:0:b0:42e:e0c0:af1e with SMTP id j13-20020ac85f8d000000b0042ee0c0af1emr1011018qta.10.1710401973140; Thu, 14 Mar 2024 00:39:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710401973; cv=pass; d=google.com; s=arc-20160816; b=DAod0HR4WTvSCwIVbeqjRSSDi6TKm4sLtRhMLcFAsp+pmQ04aw90ibMEIb2k6thcc8 sRlJ0H/hB6XXcl4gH9msRojMJPRSRBMppuVbTvf0o+M7dkUk+LEXMnG0GoHsmm6VChVc rClVVbRcaU1XTZwSE2JQT5uPQ6hTt2XfKH7hXlyMDW02ViE4AOnGLhfxegjN1KM0uMsq 4K5TX77bHYCDAQFT0xDGTdx2UlENDuWMlx+66+CuslEPIDEvUMeuES0UP0kNX1A5ztT3 Wl9+2aEk+YmVjShRGZ2qJoTWLvZEmdFV8ehZ6GxtZc+ARUbCF/wONDNaiSBvtgIopzzu rkrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=nnha1qea9vft3Z6+irMALn1pdyDOivvnlArNLW4U/VI=; fh=eG/NYzXTQvX/cNRpOji26sl1QJxOr68F8M9tjeGpJ7Q=; b=y6JjXxsghEQ2E8MPO3Vssr/Xa1EVC4Jbok1ytcD7YNLoW53h2cO79WBWbQZCV03Ty6 qJhpCbqfc16wpNUMluDXny9YRa84+hoHQ0Yp5FV3pJaf6Em1/q2HhlRtlLPzhirToDnu MNePg+XElANpPgM3TeQ3SXzjaIwC25rvCULI/P731VeJ6emrVdWbcl5qpKlooXs426Yv sMrM9YB3ZpKwKEyPx0sP8fPYZ6uKHfgWIwbmPDOfm9I89BLMXvq06Iidxi2S0ul0s96t GG3NobVOw6xS2JUiIjTwjw4MxFVYClb3BD/Q4oRxQfROHVxYMU2dcYA1d/BbaAJ+eTHD BtSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b="jZiU/ttU"; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-102935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p12-20020a05622a13cc00b0042f1b27c480si919836qtk.520.2024.03.14.00.39.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 00:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b="jZiU/ttU"; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-102935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CFE451C21A09 for ; Thu, 14 Mar 2024 07:39:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 274555C908; Thu, 14 Mar 2024 07:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="jZiU/ttU" Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F378D1A38C8 for ; Thu, 14 Mar 2024 07:39:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.134.164.83 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710401967; cv=none; b=OxAVUPscKObUkXU3y9BgP7DV9AA3SpX3r7LlNszk6Ugvtzp/EFNyUI3lqGi1mmeD1rLn8OHpF60YCVg7c8iIh5AU6fdO1nvVoNB47QtZK/W6URIXJbr3I1NUPiT15kvHQfl4aToOI7eYLT/X97Int/Q72xQOpX1mRpN4hcaMhFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710401967; c=relaxed/simple; bh=pnTHHt1TW382u+9+5iKCSJeq862HE4dvylrDAww2zLw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=AOPCg1n8wbZ/atELmhR7p5X7Cb6M3/DD9GHoIlkBjPBc/zKgtH+UohYaXA7rTC39AK/fD4q3WCaYq39UeIrgvTeGUirhYOn4QugOLNQp68FyFSAKx28qXj6rWvQkFHmg+3hr0qfuY4obxH6OP7DsiUt8Q5d+X3sklou5K4UoUog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr; spf=pass smtp.mailfrom=inria.fr; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b=jZiU/ttU; arc=none smtp.client-ip=192.134.164.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=nnha1qea9vft3Z6+irMALn1pdyDOivvnlArNLW4U/VI=; b=jZiU/ttU1LGt8+0f3sWchKmhgdti1zFVFU2JDgTP4rk2oODyWKp/qfvh RejB4iqcdvW28UnBnVICna8A5c5v3xOwLOfsShcBDvOFUY6/V0jFJZGSo MjX2ulv8RXjPw1U2lITj7HaAbnYN3gYZLJGYECdqRmhP9tgDWPHnfLNT2 4=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.07,124,1708383600"; d="scan'208";a="156590462" Received: from dt-lawall.paris.inria.fr ([128.93.67.65]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 08:39:16 +0100 Date: Thu, 14 Mar 2024 08:39:16 +0100 (CET) From: Julia Lawall To: Ayush Tiwari cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, outreachy@lists.linux.dev Subject: Re: [PATCH v2] staging: greybus: Constify static struct kobj_type gb_audio_module_type In-Reply-To: Message-ID: <58ef977c-9a85-c0b9-a7bb-b31f92597581@inria.fr> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Thu, 14 Mar 2024, Ayush Tiwari wrote: > Constify static struct kobj_type gb_audio_module_type to prevent > modification of data shared across many instances, ensuring that the > structure's usage is consistent and predictable throughout the driver > and allows the compiler to place it in read-only memory. It would be helpful for the log message to include some hints about what you have done to verify that the change is correct. julia > > Signed-off-by: Ayush Tiwari > --- > > Changes in v2: incorporated changes in commit message as suggested by > Alison > > drivers/staging/greybus/audio_manager_module.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c > index 5f9dcbdbc191..4a4dfb42f50f 100644 > --- a/drivers/staging/greybus/audio_manager_module.c > +++ b/drivers/staging/greybus/audio_manager_module.c > @@ -144,7 +144,7 @@ static struct attribute *gb_audio_module_default_attrs[] = { > }; > ATTRIBUTE_GROUPS(gb_audio_module_default); > > -static struct kobj_type gb_audio_module_type = { > +static const struct kobj_type gb_audio_module_type = { > .sysfs_ops = &gb_audio_module_sysfs_ops, > .release = gb_audio_module_release, > .default_groups = gb_audio_module_default_groups, > -- > 2.40.1 > > >