From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1uFlL8-0005aB-7t for mharc-qemu-trivial@gnu.org; Thu, 15 May 2025 23:02:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFlL7-0005Zm-4g; Thu, 15 May 2025 23:02:25 -0400 Received: from mgamail.intel.com ([192.198.163.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFlL5-0002PJ-9S; Thu, 15 May 2025 23:02:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747364543; x=1778900543; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=T6a4JpmpVPPBxMlEtCwTWcpYCmTHuhKCQK3n2fiJ2oo=; b=f5qMqGLBIPuHdaJR0A1SWJJ1XyKKjNrp+BzI4SI5zTh0WmjagW4Kb8yO C2irwzanIrfXeUHq0mr9e2JaE4smQ+02Q2vmm2v7tAUc9gDUPa43jkIF8 sObNbmNiDwZHlP9PxccwYs8voy1pSXn6ueERZiPISHpE8LPU97HAtb3bf 5f4kq+HoGg6Et+dXnqCDLeSBXLwQhzLoNRKxJWyz5l8bi/ebzIqVs0qO6 +ynR0kj63ngrCcnUxXwvcZKkg+NwnT3wJytjEU58ndeGStbbobajMwHkH 6TRcRGttvuiee9XEZkgD41sFHlsX2hpgUhRz2AYe8bSVTbxq7GM3CG+iJ g==; X-CSE-ConnectionGUID: xqrHJTeQR8ytyqDciodGAg== X-CSE-MsgGUID: 63gXb6OERTW+EEyAlPczVQ== X-IronPort-AV: E=McAfee;i="6700,10204,11434"; a="48579999" X-IronPort-AV: E=Sophos;i="6.15,293,1739865600"; d="scan'208";a="48579999" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2025 20:02:20 -0700 X-CSE-ConnectionGUID: BJug3vzhSF6XIdgWu2AGog== X-CSE-MsgGUID: B76+3srHRlS5nypoDzUhdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,293,1739865600"; d="scan'208";a="143329249" Received: from liuzhao-optiplex-7080.sh.intel.com (HELO localhost) ([10.239.160.39]) by orviesa003.jf.intel.com with ESMTP; 15 May 2025 20:02:16 -0700 Date: Fri, 16 May 2025 11:23:21 +0800 From: Zhao Liu To: Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= Cc: BALATON Zoltan , David Hildenbrand , Paolo Bonzini , Eduardo Habkost , qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Halil Pasic , Christian Borntraeger , Thomas Huth , Richard Henderson , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: Re: [PATCH 8/9] target/s390x/kvm/pv: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES Message-ID: References: <20250514084957.2221975-1-zhao1.liu@intel.com> <20250514084957.2221975-9-zhao1.liu@intel.com> <7dec9c8e-93d6-81f0-b075-e29b8ede44a2@eik.bme.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=192.198.163.18; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -60 X-Spam_score: -6.1 X-Spam_bar: ------ X-Spam_report: (-6.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.686, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2025 03:02:25 -0000 On Thu, May 15, 2025 at 05:11:56PM +0100, Daniel P. Berrangé wrote: > Date: Thu, 15 May 2025 17:11:56 +0100 > From: "Daniel P. Berrangé" > Subject: Re: [PATCH 8/9] target/s390x/kvm/pv: Consolidate > OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES > > On Thu, May 15, 2025 at 05:41:40PM +0200, BALATON Zoltan wrote: > > On Thu, 15 May 2025, Zhao Liu wrote: > > > On Wed, May 14, 2025 at 06:24:03PM +0200, BALATON Zoltan wrote: > > > > Date: Wed, 14 May 2025 18:24:03 +0200 > > > > From: BALATON Zoltan > > > > Subject: Re: [PATCH 8/9] target/s390x/kvm/pv: Consolidate > > > > OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES > > > > > > > > On Wed, 14 May 2025, Zhao Liu wrote: > > > > > > > +OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(S390PVGuest, > > > > > > > + s390_pv_guest, > > > > > > > + S390_PV_GUEST, > > > > > > > + CONFIDENTIAL_GUEST_SUPPORT, > > > > > > > + { TYPE_USER_CREATABLE }, > > > > > > > + { NULL }) > > > > > > > > > > > > I'll note that existing callers of OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES > > > > > > happily ignore the line limit and put it into a single line. > > > > > > > > > > > > (which ends up looking better IMHO) > > > > > > > > > > Ok, I'll onor the existing conventions (which I'll apply to other > > > > > patches as well). > > > > > > > > There are two line limits. If something is clearer on one line you could > > > > exceed the normal 80 chars and put up to 90 chars on one line for which > > > > checkpatch will issue a warning that can be ignored for these cases. Over 90 > > > > lines checkpatch will give an error and I think you should not ignore that. > > > > > > Thank you. This makes sense! > > > > > > > Maybe try to put as much on one line as possible instead of new line after > > > > each argument but without exceeding the 80 chars or if the whole line fits > > > > in 90 chars then use that. Or maybe do not indent second line under ( but > > > > with 4 spaces then you can fit it in two lines but lines over 90 chars are > > > > undesirable. > > > > > > HMM, I understand you mean: > > > > > > OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(S390PVGuest, s390_pv_guest, > > > S390_PV_GUEST, CONFIDENTIAL_GUEST_SUPPORT, { TYPE_USER_CREATABLE }, { NULL }) > > > > > > The second line is 82 chars and now I think this version is better. > > > > Yes and maybe can even fit in 80 chars if using { } instead of { NULL }. > > Personally, once you have to break the line, I would be inclined > to have *nothing* after the '(' on the first line, and then break > at the list of interfaces. ie > > OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES( > S390PVGuest, s390_pv_guest, S390_PV_GUEST, CONFIDENTIAL_GUEST_SUPPORT, > { TYPE_USER_CREATABLE }, { NULL }) > This version looks better! Thank you all for your patience. (How to elegantly break lines is indeed a matter of taste, and I've improved in this area now with your help :-).) Regards, Zhao