Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1518171rbb; Mon, 26 Feb 2024 11:50:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0GjqvGXjGPMI2I+ebeR0u+t5PKEF5gGopwmh6xVd/wNZDAEY2FA8jNDF50PDWV4+fYCn6oFgavRPr7eyOlayDa7ZkjnHEJ5t1IENTmA== X-Google-Smtp-Source: AGHT+IEfmK6cmfBvdBoA5zXLtJzGHgnFiHUNJP+9B6oFp9Vdtvo/OO3S+d3ARelc6D2vI22b7XYt X-Received: by 2002:a05:6402:35ca:b0:565:ba2f:85d7 with SMTP id z10-20020a05640235ca00b00565ba2f85d7mr5215058edc.37.1708977014129; Mon, 26 Feb 2024 11:50:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708977014; cv=pass; d=google.com; s=arc-20160816; b=gFvmep0xDtbyt60xjLng95g4bR6q2/3A/F6ayZN4hn8WnybZobWyc3SPxyaSUlQocb 0BgHzNqZGi3IzeuJiWNbQ1EkCZO/731nfBrquwM7OR4VE6DzQbn18Qz2ugFO5Oq/OBhD F08WC/+JxsBeUJtUxzCKOf3l8KkHqVntQ9NA0NGH06SIhx6HhwHPDCWJYI1eSbWN7CId 7EZ2zP4AQ/GgIi+o9q9TYoAPnE/xISBv6JGbgxy1sdCUQz/3Kk5x0UJcoUl4O096NPNt 8QKGrBPejuNJ8nK/UQzfP/lxhlYateh2XhZSpSKLxFS5LMHrE6Mudi2N4n/T4yK9Nsjz W/jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=EAVCZoKYn3AEDXjkAwhVC7Z/hnkKJALO8ZdxGQStZT8=; fh=NYvtfQzvrdQVq4P4I74gYCJXMPEsK3R96TmL5vlO+bk=; b=UN8Hkq+ZIeWLN9nFjTZ49zLc0+hr59OWEICMNLQIsVIJpyUNG/4aIwiqkl5mSAxr/o 47Np9KWAGtck9TF2zxud6nVArmBvTl5och4l7aBps49oCcEqKuXNiWvRMzu9Zp4FOc5Z +WLeQMbqZjF9qm2a2gmDcvZqR8dOEWwzuf4e8ZvPgAYnUr0EAEyGdYYel6+DAEu/o9g4 rMmmKuJpu2lJywQT1RVK3T0FDQ3X5rcf/sH2HgGqtV8m3TBzSa+VA3y6Bo4WPzwh+j37 FUs4NvaUziBazU0oAhYqdaSBXwDZpEoBts2Xpe6j7Os9NXXQB2eWOydhwtovbSGA1nLP cDuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=bqivvzTH; arc=pass (i=1 spf=pass spfdomain=ieee.org dkim=pass dkdomain=ieee.org dmarc=pass fromdomain=ieee.org); spf=pass (google.com: domain of linux-kernel+bounces-82268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ieee.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w6-20020aa7da46000000b00565aec5217csi55987eds.3.2024.02.26.11.50.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 11:50:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=bqivvzTH; arc=pass (i=1 spf=pass spfdomain=ieee.org dkim=pass dkdomain=ieee.org dmarc=pass fromdomain=ieee.org); spf=pass (google.com: domain of linux-kernel+bounces-82268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ieee.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id DE1481F2532C for ; Mon, 26 Feb 2024 19:50:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4720130ADC; Mon, 26 Feb 2024 19:50:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="bqivvzTH" Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (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 D2D20130AC0 for ; Mon, 26 Feb 2024 19:50:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708977010; cv=none; b=uewRCQ2gdJhWDhnnYUS5j2Yil86CTWDg6xk2RPFB3DJzpWqmHh+vFcspBT5DqihCPPjGN5d9/qvWmnP13u/UuY1Ji5QtDX0VrpdBXVTN+RXLhM8fpbgfvaGPtu5Z9zKwT1vwJy+vt+P4fZVB1QY4UyDlmnbNsa5DZA2zvHTeM2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708977010; c=relaxed/simple; bh=cJ7HIUxiHnUtPWkj+CXbcPdYJXZ+f4CRr1LUprsJ6rQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WTtwfw3GkOS9TA6AmCCDDi8K60pa76chn+VoKt+YJy+6SiJ4PSLg1gzPDuYdOhXxjHd2zmqdziLpCG769BrRJl7Ji+gZEu2Vq3LFuvVhieid3kj41Lts9Dqa7OIa1GlOF2d41X1PHhPydEW9LH2z6YXsIK/JRB9n5VHXy/ko/fo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ieee.org; spf=pass smtp.mailfrom=ieee.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b=bqivvzTH; arc=none smtp.client-ip=209.85.167.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ieee.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ieee.org Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3bb9b28acb4so2464955b6e.2 for ; Mon, 26 Feb 2024 11:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; t=1708977006; x=1709581806; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EAVCZoKYn3AEDXjkAwhVC7Z/hnkKJALO8ZdxGQStZT8=; b=bqivvzTHk3Y3uGhymjwxsda3orKYXv1yhsbIu93jmlQZBmiJ6Lyho2oeQNR5BZUagL RopmA+BuoikjYbSIssJLVLFslfeKypvvNxoBD9Le0xFb4Vq2Dsbtpz0EvjdauOio2zTS E5mlcGrVdPg1nL2An2xEZ1fn4TPKA35jVr8Jg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708977006; x=1709581806; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EAVCZoKYn3AEDXjkAwhVC7Z/hnkKJALO8ZdxGQStZT8=; b=gjO9tO16zX+5ZLkgZ5rBJEWqVqiZgKMFS+ZSXjgN4LGLsApFhWZzcWbnxARmkK9sfb DLHuIcXTfXyq+3CV1+TiPgVT8BrjC+6iwadTz2dkVolAZUBzQg5W1URQkHDtKMbC+QHF AhZ6CqMaBlucklbGpOM53pwDUTIEwx0lw81Q8Y0Dt6fcVhWhhvPPbDQorFTmOAsCg4o3 3yNN86x03DOGfw2im8/O9JwfF4fbH0hvdebvg1io690t5hS66WgnZ93UIdqFSrguN+dj xVTE6dKWv99UzkEUK5px+NLnKC75iP29wXcyrf7ivjylpFKc3wyJAZYFejBZrFYD/up1 F9Xg== X-Forwarded-Encrypted: i=1; AJvYcCWN5oPd4SIf1e5JhbkxQpvUFvdOI/luz80OEnTG4Ntbp4LXzBe18QFB0mAQa+/lf0W9qcLDK/1pES9ICYburPO7ObeE1OoHY6Hdh1gb X-Gm-Message-State: AOJu0YxlfTSck4N51xlRP7gAyH2+1pZQID4c/wfLSUYw7k/9zM+4efXS oP3ronSepp4hx+KAb4k8ezT+xF1G0uB9aXxQRkYc9jRD0YiBV7aOaw7oKM9N4HiAITQCxjCApIk = X-Received: by 2002:a05:6870:14ca:b0:21f:dc6e:e4dc with SMTP id l10-20020a05687014ca00b0021fdc6ee4dcmr6334366oab.5.1708977005991; Mon, 26 Feb 2024 11:50:05 -0800 (PST) Received: from [172.22.22.28] (c-73-228-159-35.hsd1.mn.comcast.net. [73.228.159.35]) by smtp.googlemail.com with ESMTPSA id t10-20020a05620a034a00b00787e11574c5sm82378qkm.125.2024.02.26.11.50.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Feb 2024 11:50:05 -0800 (PST) Message-ID: <17e89261-d46b-4845-9fca-05dac3006a39@ieee.org> Date: Mon, 26 Feb 2024 13:50:04 -0600 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] greybus: constify the struct device_type usage Content-Language: en-US To: "Ricardo B. Marliere" , Greg Kroah-Hartman Cc: Johan Hovold , Alex Elder , greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org References: <20240219-device_cleanup-greybus-v1-1-babb3f65e8cc@marliere.net> <2024022553-deepness-sublevel-73de@gregkh> From: Alex Elder In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/25/24 5:04 AM, Ricardo B. Marliere wrote: >>>> On another subject: >>>> >>>> Johan might disagree, but I think it would be nice to make >>>> the definitions of the Greybus device types as static (private) >>>> and make the is_gb_host_device() etc. functions real functions >>>> rather than static inlines in . >>>> >>>> It turns out that all of the is_gb_*() functions are called only >>>> from drivers/greybus/core.c; they could all be moved there rather >>>> than advertising them in . >>> I guess it depends whether they would be used somewhere else in the >>> future. Perhaps it was left there with that intention when it was first >>> being developed? I agree, though. Will happily send a patch with this if >>> desired. >> Let's clean the code up for what we have today. If it's needed in the >> future, we can move the structures then. > Sounds good to me, will send a v2 then! I might be misinterpreting Greg's response; I *think* he agrees with my suggestion. In any case, please do *not* send v2 with the purpose of including my suggestion. If you send a v2, keep it focused on this original patch. You can then implement the other suggestion as a follow-on patch (or series). -Alex