Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4434176ioa; Wed, 27 Apr 2022 03:55:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoAcxuVv3lpCTmNL99FHI5FvBG9mfn0Bm4AivddoAKxBjokiQn0uJkVE/vUjqio3RpQlfr X-Received: by 2002:a17:902:ccc4:b0:156:5d37:b42f with SMTP id z4-20020a170902ccc400b001565d37b42fmr27781914ple.157.1651056919696; Wed, 27 Apr 2022 03:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651056919; cv=none; d=google.com; s=arc-20160816; b=nLs0RjkRb9E8K9Nm1bUYfhyNa/8UF0gak2RocpC1+07IVacvi63Ka8HlbtIG51ADdI gpwAyBzgC3ZeeJJrnpT6OiwdjBeDnRC+Lvoukn9D/QrU2qCS0U/fD2t090OI9vwLQk92 okJZL9jb81UR2oTTn4yjzqaAknsmHZDd5oajafftyedVCD7ZgtaPgf9EOypT5mSSFCDz SQx7GMb6ZE5QWYVBHA21AuyzXuKAQr2BpucWH7/hFDSxemQYu04iFCTFLMv6d5lECHWR HKlIqdhlUQvOizvSVuWJwTzKCx/nWAmatlHTP0wnnA1HtcAoo1Sg+oDuBXtaH1SEn1af em7g== 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=rDLG/MXT0I2bMPUb9jb0eLkZ/LDMp3HbJ46Mt/5aBXo=; b=cBFAOipXyE+4zloCwWjtYC3BDsXZ9BKLXYuNcrvJGMKECGLopc3P+wAYvxdlwnpfyZ 9h1ByrJRyqsfWySbo5pJh6l0Sn+6XovxN6jgvaeqIeoe4i4Y+QJHzfl2jl47IrKmro3N GPOzfx8XFlgBI235oj6KIyoA0Al23Lv7LHS7ugiRIp8/SUyKxQl296DLdvwwXKAJ7J+/ N/UDHg+gy/iFiJg9Cd0AkaUMcM8sEQ4UO/VlOsvaJdjhpQRlQuNkGRm3V5SnASaBmBfF 5byF4/woAhRyi0jEzcF2nBVETUxm6FogH+nBfO4KKULw8/T9wu9xvouWz3FjJBULOl0z t86Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nYJ4fead; 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=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lp7-20020a17090b4a8700b001d97824944asi5404767pjb.190.2022.04.27.03.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:55:19 -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=@intel.com header.s=Intel header.b=nYJ4fead; 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=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FA6581EF2; Wed, 27 Apr 2022 03:00:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359361AbiD0IVF (ORCPT + 99 others); Wed, 27 Apr 2022 04:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344335AbiD0IVE (ORCPT ); Wed, 27 Apr 2022 04:21:04 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 749032D1ED; Wed, 27 Apr 2022 01:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651047474; x=1682583474; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4eQwnHv73t3DM77yvY9E91P67tUvy3j6uTNJ4V2P08U=; b=nYJ4feadvQ8aCiKoo4w9v9DeVgttdyUEh+51Urwld6iA9aUXLRY0jFe2 1qSV22smymrkB9HGJe552D2MilgqqB02tUmiv8QCbMMse6qnSREAk0u/4 cQ1K00Ir44ZF/H1qI1+oKSBMG8KEXmHZ4WmZ6sKgsY3IaOzQbr05WQ8dc e69kVSuXo7mm8MPYRqIPCR3YcfTbk13aQWTXd7W0Fe9ga4M75qkI5PzFV TkmQxFL68haoaYwa8xklDFod97FlBKzKSdA66oMArAutqcoJhIOH9lwgj siSDWkjwtrWDoe3vUd7N4GKE4kRx04KxBppaYEpc3LPhTysilRjfteH95 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="264704590" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="264704590" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 01:17:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="705439773" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 27 Apr 2022 01:17:50 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 27 Apr 2022 11:17:49 +0300 Date: Wed, 27 Apr 2022 11:17:49 +0300 From: Heikki Krogerus To: Greg Kroah-Hartman 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.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 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? > > > > + > > > > +int pd_init(void); > > > > +void pd_exit(void); > > > > > > 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... thanks, -- heikki