From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECB21C43381 for ; Mon, 8 Feb 2021 18:53:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE13F64E74 for ; Mon, 8 Feb 2021 18:53:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236003AbhBHSxb (ORCPT ); Mon, 8 Feb 2021 13:53:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231717AbhBHRHh (ORCPT ); Mon, 8 Feb 2021 12:07:37 -0500 X-Greylist: delayed 9298 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 08 Feb 2021 09:06:57 PST Received: from antares.kleine-koenig.org (antares.kleine-koenig.org [IPv6:2a01:4f8:c0c:3a97::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58FFCC06178A; Mon, 8 Feb 2021 09:06:57 -0800 (PST) Received: from antares.kleine-koenig.org (localhost [127.0.0.1]) by antares.kleine-koenig.org (Postfix) with ESMTP id 4E74DAF4026; Mon, 8 Feb 2021 18:06:55 +0100 (CET) Received: from antares.kleine-koenig.org ([94.130.110.236]) by antares.kleine-koenig.org (antares.kleine-koenig.org [94.130.110.236]) (amavisd-new, port 10024) with ESMTP id iLo2XktlSSdX; Mon, 8 Feb 2021 18:06:54 +0100 (CET) Received: from taurus.defre.kleine-koenig.org (unknown [IPv6:2a02:8071:b5ad:2000:36f3:9aff:fec2:7e46]) by antares.kleine-koenig.org (Postfix) with ESMTPSA; Mon, 8 Feb 2021 18:06:54 +0100 (CET) Subject: Re: [PATCH] USB: serial: drop bogus to_usb_serial_port() checks To: Johan Hovold , linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org References: <20210208154806.20853-1-johan@kernel.org> From: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= Message-ID: <9306d82c-d030-1243-1079-1ff5339f6cc5@kleine-koenig.org> Date: Mon, 8 Feb 2021 18:06:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210208154806.20853-1-johan@kernel.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k49IEZqBnOohKuCwZKCjS1Cxw6MLoXDJA" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --k49IEZqBnOohKuCwZKCjS1Cxw6MLoXDJA Content-Type: multipart/mixed; boundary="cOM6hUIfA6GQyQV2hyh18WCASW6jV7myA"; protected-headers="v1" From: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= To: Johan Hovold , linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Message-ID: <9306d82c-d030-1243-1079-1ff5339f6cc5@kleine-koenig.org> Subject: Re: [PATCH] USB: serial: drop bogus to_usb_serial_port() checks References: <20210208154806.20853-1-johan@kernel.org> In-Reply-To: <20210208154806.20853-1-johan@kernel.org> --cOM6hUIfA6GQyQV2hyh18WCASW6jV7myA Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2/8/21 4:48 PM, Johan Hovold wrote: > The to_usb_serial_port() macro is implemented using container_of() so > there's no need to check for NULL. >=20 > Note that neither bus match() or probe() is ever called with a NULL > struct device pointer so the checks weren't just misplaced. >=20 > Signed-off-by: Johan Hovold Reviewed-by: Uwe Kleine-K=C3=B6nig Thanks Uwe --cOM6hUIfA6GQyQV2hyh18WCASW6jV7myA-- --k49IEZqBnOohKuCwZKCjS1Cxw6MLoXDJA Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmAhb54ACgkQwfwUeK3K 7Ak5WQf+J+4IrFTCasBl6iUF3PXecU/H/9Yf2akmx/hBq8TAukMBZndHvCfL0Yug efqNj3qZyAywgvT8HCNceIP4i4Xjwt5HK5WKYklqD0mpNkXWSZAHx7j0D1DbCJvd 6dY4moUgaLdY/bYdMlQ/ZfNparSgaBWiHwBU1HlJ66XGXapxIycwrb13VfaSnRrX B52gOQ6xDjJLGDpiSFz20s/mziM2/F/h2OAQpL7N66A3QSvJS33SDNrl4c1dRcYl qByp+i3I+job5NmjaBtA21aIu+iQ4xe8PZF4NFnuQo+kkuZ+3tkuKPoNGp5MzRdK z7Xk0kT60wl7uZ6k0M8eiOuBaqHKVA== =+3gP -----END PGP SIGNATURE----- --k49IEZqBnOohKuCwZKCjS1Cxw6MLoXDJA--