Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4477730ioa; Wed, 27 Apr 2022 04:52:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx6B23wlTOO66EroLfkBmigLvfzej7i3cI0yPP1p8akNlkEYqQ4e6MubryT6+DRD2b6Eoi X-Received: by 2002:a63:2309:0:b0:398:d3fe:1c41 with SMTP id j9-20020a632309000000b00398d3fe1c41mr23804839pgj.131.1651060356034; Wed, 27 Apr 2022 04:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651060356; cv=none; d=google.com; s=arc-20160816; b=c2mY6PxqB4NYa+lQ6xf8A3RfGW9ahRe70My3TJh++zJEJ9tcfhUui0F9nVX73zmCel T9mzOiE+EwjGPhZ0HgRLeWZ/wp/NlxDtrzPNRZN7woiyuZSHQuzCSyVQksHc6Ux76Vf4 t/QFu8r/S1dGVFu+0Rf0OtIy/Xv+OH+KxnZ2tnZPiigj20C1eHMr0yOZAljMdRVN8uzS QZmiuBA+PkTVs4MsTshPpvipCkRcXku/AYC9Q7oicGZtO08UNKQBGs6Kl/q8eT13Oohh 8qL7TnIUvvq0HHQXh3mwTUQF/I6mN96eywu4BXeNhK3yFRX9SaSa4eY7+UztM+7v4Q48 tSNw== 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=DI8CfDU6Y4wS5UBhqg/yFoRdpF773CVYhuDdMd0c1vw=; b=UJXv9dTsMam3uS2n7YBCsZDhypqPZR9o2/24us5//wSVidMqfYtDK1FlDXvUGJAnOm TaB62lEUH0hinZe9z/USI0j5uE+pSYoYLWUnk0xiAgukwixhvbN+z8zPOuu2pVLxJ4vu Okj1XpfN4VOgSDttzsZIH0GFBkx/r6TuheFI5K5Bv+1DodeEK02DM0MI0rPuEuYktLTc jE7eI9L2Lef7oz7OAJpjP3X0niqUwBXLZGzu/eMNhNm+nyZxiAfYh/2ShAW63P4mrsmt dWhdyy2/69TAAYW5sGztWMXX0b8m3SaDa5CD32vEl62yVg8TcUa8M30unJcEGSX8G3GT n/+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B7o9vEFr; 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 j4-20020a17090adc8400b001c6f8b9aea5si1386754pjv.42.2022.04.27.04.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:52:36 -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=B7o9vEFr; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 809A72C67B; Wed, 27 Apr 2022 04:17:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232290AbiD0LUF (ORCPT + 99 others); Wed, 27 Apr 2022 07:20:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbiD0LUD (ORCPT ); Wed, 27 Apr 2022 07:20:03 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8B84165A3; Wed, 27 Apr 2022 04:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651058212; x=1682594212; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=HIRF5W5o/gV3DIQXa4xMa+ibJZeT9Xrw34R4dA4zxYo=; b=B7o9vEFrJCS65f5xHiQWVGGAYQxaHrCOLKifntW21gPsPdFDeolQcxSN +aR2ugrsv5ZnxFCisIUa0mlCt7HW9nvMPT6IRFlCK3F8GVBJnTrS322DU 3ffrpeUBKwG+6feTZeUB0ogkPE4Lz58S6AzFLYa14VjSSsoD3ZsQ9wuaw w129/zZ6e0d5iPQubJOwVZpU9XBTZbIMBHhLkFM3XCCTJ21QoV8JWeq9F 9iQH3IZjHnkp9fnsLXKOADivJnsUFca9hxrBVsR5FBepY8RVrkbbTw7jW K/nwgc4JPkn+LhgcdIqX/aOL/vgarfssuAelZiyEzXxumSxOK9nRK3Zax w==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="291045239" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="291045239" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 04:16:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="705498756" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 27 Apr 2022 04:16:49 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 27 Apr 2022 14:16:48 +0300 Date: Wed, 27 Apr 2022 14:16:48 +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 10:50:35AM +0200, Greg Kroah-Hartman wrote: > 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 :) Very well. > > > > > 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. I'll fix this. thanks, -- heikki