Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp441915lqg; Thu, 11 Apr 2024 07:34:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkd0A7nIgKv+T56l+ueN4PdHAahgnoY6Y7EGJk+fn+qpTx4LiS06MOcFa+IQHRFxGgMTXIRM+gcNXExEF6pE48fjl6zlU3TBZI2f/uBQ== X-Google-Smtp-Source: AGHT+IHwIJQG1hbvyNPNmeVBlh5IiRyXh37iq4Teacblo04fXi9zKl+3jG42fSaaLJfp+zjcgFpO X-Received: by 2002:a05:6a21:78a9:b0:1a7:6918:9e96 with SMTP id bf41-20020a056a2178a900b001a769189e96mr7116937pzc.3.1712846076521; Thu, 11 Apr 2024 07:34:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712846076; cv=pass; d=google.com; s=arc-20160816; b=CWE1tjkknz/C/ALi2euYoNGZrg8gjLuQiOY0gYsRgo4qDQJDEdzHuy9G83sUhkX3Df uchPucu+nSfwc4IQJ4OxvBFM1i5+R1cJQmjcsl9p3PPpxhhHo0zJCTnrAhDHCTTT3+FG nLyRb1mvqxX3xuRV4SNYSUqNB+A0M/4szE6KZzZxKwYr2IRNc6C0RndptwVLKZrEVk7E 95Tmz9F+A5q8BuguyaequyhPx8aSpBYCKLCYaaAAKgE7w659AtZzD6ss606VK2EGwSok u1T8yH+Fk4Nk5gZugIV9pzrqCn6QV0Bcy8PTDfe6A224DXfiUCP+JMi1lNHgEfH0zIKg mFfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:message-id:in-reply-to:subject:cc:to:date :from:dkim-signature; bh=k//eQKYSVHMDVvzUu3hCUHmEjSjTjgy+HLKKKsOahTA=; fh=HVvxNOAJRrl+K626ojKePrrMWy7ZFU0o0eIm4qPLcL4=; b=SuojlxKhlKcOOkCFvkbT0IetU4QrMfoyX9qTM5bddCd1oJHflP1iy5BR/iUpv8j6v3 L55ICk71mhK8D2DDrmTXav1SzK4OiBty2BEs9xL5B328gA1qgJEf7Dd/2Ddqvh5xTAC8 Wz09sa+m4yOLjGkh4FXWyaxvDec3Ux3lA4z0DEP0TFN+jm2H8hHGUo3J7gKHjMJTH7+s 8nB6+YivWdL7JC3o81eVyn7uWhpM/j3G5Dd43bsKhatyIH0x184+IRMNcnzQI5vcCRO5 q/wPeuRLkjN9BFvqLgKZXeXB2YLssKTvQrBxpjiN+Bloq7B6GYDCVi+kcltgvVFYeLCd lQKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YoZ7vomS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-140329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p12-20020aa7860c000000b006e6857da47asi1461941pfn.366.2024.04.11.07.34.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 07:34:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YoZ7vomS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-140329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A68E8B22E42 for ; Thu, 11 Apr 2024 11:20:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AF171482FD; Thu, 11 Apr 2024 11:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YoZ7vomS" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 210A4147C86; Thu, 11 Apr 2024 11:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712834438; cv=none; b=kF7JadaQ6rqQGQ813AZPrnAOThZVXEDpSX7jUv+F2dHzqrgAUjIzf8Dunw/p2jjGK3+AlwTwpL3vzL3FYjUnwyqlt3lT40+H3++Wv6us5tz4E/Dm8xyLjMQicqB1R9hkRNxTBGpRu1UZEWuSjE0GDe3SU47eVzSvqa9qllTeNWE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712834438; c=relaxed/simple; bh=+926ajbsXSpyzZveFO9nj3gRQLdTdIRLCaK6UzM314k=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=WqTVy+LzS+tzEcPpzp1WeBZzyVKoRlgwfWuY5wmM0su6Q8olg7u959Y5i27cmF6sMwIY+L2aPKr9x6uZMrecN2U/3RfNjb9GxJ3AZ51FZfwvrmzkMI1w2zUaJ4zOY57+xi0NmF2Bl2hyCgVQ3pLju/N8/BHeEKvywTkgpkqVhV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YoZ7vomS; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712834438; x=1744370438; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version:content-id; bh=+926ajbsXSpyzZveFO9nj3gRQLdTdIRLCaK6UzM314k=; b=YoZ7vomSdPBuB/icjZHsGpWdVk71ddE6Z8fzKnl4/D2ehds0p1GeLJ2y Mg9DdYBW7o3Rz/dY9CbRwttH0ayjvUiGVR7XOzMUG69xk88Bn5MhaDzH3 BLudOoDzKQ5bZYT8BpZ3hEb1D2C1o4zesBLLK/uYYwazsk0ciWWRSMyoc /35QlCbCmfZE9xrfs9ZofZluN07FzHE7+8I6oGTPqfutOCjoRZiwwgmLo LTFyIReM3qSW4Tfogh4f5V2osnytbjXfklRnhpxa/mAwc64AMtCUtn56p ZaGXX58EkPJBKCqcqSsLDzgFeW9jG2hp85zr0kxUwcRaiCdZ3y3eH/83u w==; X-CSE-ConnectionGUID: VVDW2VAuRWqrQ36VZVunyA== X-CSE-MsgGUID: vx/xG8M3Rkivs28jjNDsbA== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="12016020" X-IronPort-AV: E=Sophos;i="6.07,193,1708416000"; d="scan'208";a="12016020" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2024 04:20:37 -0700 X-CSE-ConnectionGUID: VRGMNC62R4+HcPuzvSo5zA== X-CSE-MsgGUID: stVam8kfTNqJBnaEOAyVGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,193,1708416000"; d="scan'208";a="21366764" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.30]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2024 04:20:34 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 11 Apr 2024 14:20:29 +0300 (EEST) To: Andy Shevchenko cc: Greg Kroah-Hartman , LKML , linux-serial , Jiri Slaby Subject: Re: [PATCH v1 1/1] serial: max3100: Convert to_max3100_port() to be static inline In-Reply-To: <20240410141135.1378948-1-andriy.shevchenko@linux.intel.com> Message-ID: <0efff014-43a2-b1e2-6690-515a6b2a3edd@linux.intel.com> References: <20240410141135.1378948-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323328-94683981-1712834247=:1017" Content-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-94683981-1712834247=:1017 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: On Wed, 10 Apr 2024, Andy Shevchenko wrote: > As Jiri rightfully pointed out the current to_max3100_port() macro > implementation is fragile in a sense that it expects the variable > name to be port, otherwise it blow up the build. >=20 > Change this to be static inline to prevent bad compilation. >=20 > Suggested-by: Jiri Slaby > Signed-off-by: Andy Shevchenko > --- > drivers/tty/serial/max3100.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c > index 1e6b5763ce3f..07ee001640bb 100644 > --- a/drivers/tty/serial/max3100.c > +++ b/drivers/tty/serial/max3100.c > @@ -111,7 +111,10 @@ struct max3100_port { > =09struct timer_list=09timer; > }; > =20 > -#define to_max3100_port(port)=09container_of(port, struct max3100_port, = port) > +static inline struct max3100_port *to_max3100_port(struct uart_port *por= t) > +{ > +=09return container_of(port, struct max3100_port, port); > +} > =20 > static struct max3100_port *max3100s[MAX_MAX3100]; /* the chips */ > static DEFINE_MUTEX(max3100s_lock);=09=09 /* race on probe */ >=20 Reviewed-by: Ilpo J=E4rvinen It seems liteuart has the same trap. --=20 i. --8323328-94683981-1712834247=:1017--