Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4450519ioa; Wed, 27 Apr 2022 04:16:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcjpChnDSH3AQj3iW2VrtAo9mZ8JIbwayGLZzMEROcNV9JTPgt2WdHMZAsTebtPb9Ct1LE X-Received: by 2002:a65:460d:0:b0:39d:13e0:d571 with SMTP id v13-20020a65460d000000b0039d13e0d571mr23406204pgq.596.1651058170831; Wed, 27 Apr 2022 04:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651058170; cv=none; d=google.com; s=arc-20160816; b=W1ITtcVrhU96ueFB/FwRaawNtO/D5GHnrODNVhlsrhzYVIeS0SZOHYAD+gb4qJ25Jr JnZqEJF/icOY2ieyqFGXrpSDiWSs38h2jXj33yk2YYC7YVkzQ3WQOSIBs6D3ds/eutil xIRjoJ7Nw1j8gZDfdtESHmwK0wSc7dv58ETEysNM04MSYYQW8UalFSFSrh2h+FV0E/QW ydFAnuogQ++Tl1eM4KWZonxvihSqEVig7zFpd3baftVDzJoSGa6oZ5inDQUeTe9d4M84 bubhFDgRV1vN3grhD864Q8Ca+oRtctuppw7dWl0BpyWeuDNmzMXkZ0LJvlV/BoyeSHJY Y8vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bp7RTWEeUoREWxqqGK58l3USgjvfonVP0r9PY3WQ5Wk=; b=fofzIePdjQM9tN8+aPDcBVojNvU63wa3cqJoYzyfvc0RQxl6vfOjf8Yy58x3myh+RD bKutNAsRi1PIXZk1asAFPGkZnnvxLtINntsAw6F2pdIYuPw8duQkYH7VWeJQq08hhKUQ YWih9lnT2ZErmlo5GgQNWxp3Uaa9XFyfkufNFQS/KTVzEgVTLCMYMClJn4DXrVa8LX5c aO1p0N7y1u6qxjzx98XUfUP/wATSqfcdhZJNr5JZKMN2q9NDEbUHOv2MpV1fvvepvo7I 1wL/FooskzDgx82juIXq9CxbhxsBIhABPiqAZKQ3iTaf4CFHJkOvqSH9pgvn4fY1taLt gAIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HPKpNVyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p28-20020a635b1c000000b003ab2bbbecd7si1305179pgb.146.2022.04.27.04.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:16:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HPKpNVyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9E04230673D; Wed, 27 Apr 2022 03:09:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351058AbiD0IyF (ORCPT + 99 others); Wed, 27 Apr 2022 04:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359577AbiD0Ixv (ORCPT ); Wed, 27 Apr 2022 04:53:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB1FCDF4BA; Wed, 27 Apr 2022 01:50:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5E98961C39; Wed, 27 Apr 2022 08:50:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 645E3C385A7; Wed, 27 Apr 2022 08:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651049438; bh=nq7/CDH4aTXlXNOActxnTDPggtDZ1TzxYbung5bS7xA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HPKpNVyf9NjowBhrE7NfG5DG0ghxJLvrIKDbN2nryv8ujxzK6oNKhYdCjw7gFlqTv iu7is0b0hxIb5/eCjfF2qGloQiYmRPWIwoupRr7FXOy86bG9whKRa7V1tFB6ynEUeD NR4wBR6GaPAxuvhBMY1Jc8c6TQZXLI9Xl3zZV6t8= Date: Wed, 27 Apr 2022 10:50:35 +0200 From: Greg Kroah-Hartman To: Heikki Krogerus Cc: Benson Leung , Prashant Malani , Jameson Thies , "Regupathy, Rajaram" , Guenter Roeck , Won Chung , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/3] usb: typec: Separate USB Power Delivery from USB Type-C Message-ID: References: <20220425124946.13064-1-heikki.krogerus@linux.intel.com> <20220425124946.13064-2-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 27, 2022 at 11:17:49AM +0300, Heikki Krogerus wrote: > On Wed, Apr 27, 2022 at 09:30:30AM +0200, Greg Kroah-Hartman wrote: > > > > "struct pd" is just about the shortest structure name I've seen in the > > > > kernel so far. How about using some more letters? :) > > > > > > Okay, I'll make it usbpd. > > > > How about some more vowels: "struct usb_power_delivery" please. This > > isn't the 1980's :) > > "struct usb_power_delivery" is fine, but I would still really really > want to use "struct usbpd_capabilities" instead of > "struct usb_power_delivery_capabilities" - it's just too long. > Is that okay? Nah, spell it out please, we don't use "usbpd" anywhere, and again, we don't have a limit of characters. Most editors should auto-complete anyway :) > > > > The kobject question above goes to the code as well. You are creating a > > > > bunch of raw kobjects still, why? This should all fit into the driver > > > > model and kobjects shouldn't be needed. Are you trying to nest too deep > > > > in the attributes? If so, kobjects will not work as userspace tools > > > > will not realize they are there and are attributes at all. > > > > > > They are not raw kobjects, they are all devices now. That header just > > > needs to be fixed. > > > > You have loads of kobject attributes in the .c file. Either I read it > > wrong, or you are doing something wrong, as that should never be the > > case for a driver or device. > > Hmm, I'm probable still doing something wrong... All of your sysfs callbacks should have a struct device, not a kobject. You might just be getting lucky in that we are casting around a pointer of the correct layout. But the compiler should have caught that somewhere, please look into it. thanks, greg k-h