Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1676923lqm; Fri, 3 May 2024 03:11:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmbG/joMlMIVWksu1ckII/RPZYxirqybRl+EFrzcekg/kzQrTh3dY0sHpMxMwTH0Z4AYm73NhtbZab0HEF5L/uOLrYIUKqZ1a2gYpzkw== X-Google-Smtp-Source: AGHT+IEF4y1jxBslWPF5c6/Bj1IljYhmTO14JFjazTBbkeELMXD8+kTOZaVLC5kt+T+pZpiCfNHj X-Received: by 2002:ac8:5d4a:0:b0:43a:bd5b:3ff1 with SMTP id g10-20020ac85d4a000000b0043abd5b3ff1mr2333498qtx.63.1714731073519; Fri, 03 May 2024 03:11:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714731073; cv=pass; d=google.com; s=arc-20160816; b=O9mI54FaD8tswbVaxW8Gx5oBoRwZG1WztASiXvuseZO+PipacqLKwGZC+e8olrjdsE Z4ibh0IiOD/ljN3j7x2uQejuNSJZ3G+ei8rFTrt6QdCV2+dHZzsVEQNPdmOT92FZv62T FOSnftW5uzfxPkOvfrVQTKFQaiYeD875eva+X1V8YViHs7is6wF9Ppzn/ayTJUZb5MZf BozwAcuNcHMuqNSj2PjMJXGrv6cNm2gsncnoW8yU9/W419kxCcrGHlLFghNtAMgkqSC1 ndsVWa3m/AAeDl9KZseRvi4mqWKhchcrVrmRmMg+x/wp5YNowkc0l+cVlg7mLoHHR92p Hsfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=DDYasZY7tfrJdmcMvpk06e76IGIlcbBma1RQJtY8biQ=; fh=TB3lxmnbP/iv1jynnnA0wlO7RU3b3aAk1VMjUu2IU4E=; b=FYSa7dRmaoEJ5pUm1odIkLtrkCdEG5QHPncIWEAE2Qx4FJ6T6BtRh4N7LS6yv9RfdZ IG+gX/5gH8exMooAOBbPI/SOx4DrJvecFk47ePXwoD+MDXP/cOx69UATB095LZtt1ZPX UOXAaxU3P42bW/osH066SmSgwlSQmfd/bbZ5Hm118HbqXOlTLK6UfcouzyOLXTMZlJFo yQrRmYpMxQs0QYIpIPU48y7HKY3aTjOF0HRiQvlzzORbQdde0NTss5QJq8qdFDoVjrQX ehZJYXtuV26sHEmH+svp+QhnNhzZy5M2kRCGrUGylH6Md7pSuQazLpGqQ48xfg8GqceY W9Xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZMWvkr9Y; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-167503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f11-20020ac85d0b000000b0043ad021c1e0si2878664qtx.33.2024.05.03.03.11.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 03:11:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZMWvkr9Y; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-167503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 252701C21A50 for ; Fri, 3 May 2024 10:11:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DE8A150984; Fri, 3 May 2024 10:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZMWvkr9Y" Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF3CC14F9DF for ; Fri, 3 May 2024 10:11:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714731063; cv=none; b=NqcSyJb6VpIJz3WF+qdl7M5Pou/zk9aAKlAYy6G3kyQBFSr9CmD83TL3JVXeLIOAudk3lnF7x8zCMSe1iNM/yygQGgluradAR0z0c0vm0aMmgDp9utSXQ2iQxs7envilQIb8ezyaJG34FI4lw7vsKn9vQ1lVRq+Bc0MQPAe940A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714731063; c=relaxed/simple; bh=G37NFLjrXCTNfbfi/IPR1kIIDGRAFb95nMoZ3qFDmtU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Hg4vF9tr8RI37BAe3j6iFMPw+hTvrsjij+58Fjg0mvz2G8yyV6G+1dLuUkmVxfP6O/uZTdHo0xNdMby+3VAKWRuWqdc1Rl/drvx/xZf97NsT/mSHFTC76dgQxqWWrqU/23d4NiKOS5W8fowmJs8nyzdVuFdhTLj+kCwmsNi4bDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ZMWvkr9Y; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-41c7ac6f635so33160835e9.3 for ; Fri, 03 May 2024 03:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714731060; x=1715335860; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=DDYasZY7tfrJdmcMvpk06e76IGIlcbBma1RQJtY8biQ=; b=ZMWvkr9YC1L3E9CzagJ4fOXf7cXTE9bwfRLCJLCpORPdHgxX+05Oy4+OIYIl1qIZJ/ aVvoJ7thfiUaCNgIkl2AHbBzpjdIBXYLe/C/AFsLaOOIjv0fdKy8DnEZIbfPzrMzx7tc sIKUi/G98AIOlHkhvIRYzkg+BPciJ9ioQmw1adFuIQdmrLS16IQxNA+hM0KqpggNezBP 37Ebd7C1rTE59DRNGnesl7I4lsiYLD89uuyHBNIQ0BTFonDtBBZYBAT5BQPrgItcEzF+ ZPGA1gR3B2uWK5sZF8A1SJasR1sDmPMJgdevBAq9bGJ9eEIsefnDphk5cpLesRLNQ+M3 GWpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714731060; x=1715335860; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DDYasZY7tfrJdmcMvpk06e76IGIlcbBma1RQJtY8biQ=; b=IDv4d2m75pfudY+eY4mgggOq3PIOF5XJNDgfASFM+XSZYZ0mvbEeq4HwLSAW4j/ym7 5S/UN91+EWE/MUErrAJDTtPqkwCg4WkKU7Y9rp3fjixeQLedM1whQ6HTy4PAS/hoUnSF DCsYJQYvf34Wc/JyrSk9ZTuzrHEMzjiioN4w1tJzCzbAoPIWM8wY2rbov/dmg4Jx5YRE pRPcWa9nOPdxr+VjlMOl7CqkcwdIST4pxc5iJgu2dPQk11hChsx0jKacZB4AwMOFsdos 0dzusOnKbFL1mSuZQ19nmQs/D+wl+3Q1tXLaRrJcufVjXzxoo+4m4Zw7IkFYM5WdQ/0n hB7g== X-Forwarded-Encrypted: i=1; AJvYcCWK+VvBNToB9wgcaZ9bukoRcYi24iwo5Q4Gx2sNdJc0vAZLDVpmFh5VMLe8q3RjCzOJ6eE6WD+DjHlYm4NLWRHmIPMZCcJYkw9oxuDL X-Gm-Message-State: AOJu0YwYeWtR0HPrGzPHgQHS2IH5kjqjV/mFVOi5rvp7ZbWRP8CcJEqM 4OaG6ZuZ0KBnkJWaoPGxrNl0s848Hsh/xAZQkiQq6Q+YTCuvDuXx1aXxnEW7t4U9qo9mRzIfYMK Kzao= X-Received: by 2002:a05:600c:1f95:b0:41c:13f6:1eec with SMTP id je21-20020a05600c1f9500b0041c13f61eecmr2002783wmb.3.1714731059900; Fri, 03 May 2024 03:10:59 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id d10-20020a05600c3aca00b00418e4cc9de7sm8832702wms.7.2024.05.03.03.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 03:10:59 -0700 (PDT) From: Krzysztof Kozlowski Subject: [PATCH v2 0/2] USB: store owner from modules with usb_serial_register_drivers() Date: Fri, 03 May 2024 12:10:51 +0200 Message-Id: <20240503-module-owner-usb-serial-v2-0-7887769dbeff@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACu4NGYC/4WNQQ6CMBBFr0Jm7ZhSsaAr72FYtDCFJtiaqaCG9 O4WLuDyveS/v0IkdhThWqzAtLjogs8gDwV0o/YDoeszgxSyEifZ4CP080QY3p4Y52hwC+gJGy1 UbZWUphaQ108m6z57+d5mHl18Bf7uR0u52f/NpUSBpqtUd7HW2LO6Tc5rDsfAA7QppR9IPcXWv wAAAA== To: Johan Hovold , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3690; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=G37NFLjrXCTNfbfi/IPR1kIIDGRAFb95nMoZ3qFDmtU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmNLgvpopEGdV6Q9Mj5rYhGObBHsIo7Ce8dDM55 jnpeUhRN3GJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjS4LwAKCRDBN2bmhouD 18QtD/9M8kO5E+XLesW2AbIVczZVPklF2sOo8a0cZnbUAJ6q+iiRw05jzWaoPX4taLEGKCPQAAK tXzAPsNvuPgOtx0C4P7bNxzVCV5onCgutf4r/3eCiP0HI8oFcVaCRqyrPFpvMW5bvOfk1Rf9bi4 PBQAykCYWQ9wP93Rv/2Vv4GK9J1v7PUhKPkP+whrPHZS2gQIqE0e+rCWt6cA0bOlYyRu4zRujgU hg7amozEYn+GOD4JfNuT7T361kKK9ujD/M3y1p6PY7aGgxtwOtcYEfIWbxbLsxdG5ko1bnL18mZ wClb/3lEyrTOj/6hM7n2DXZcw+8uqXDVwIcIp+7NrirwJfo11H+VdX5J8uflfwalZhuRTtDZSou wub/p3916aGV0r6/BKypAvJF0H5uoxTycHh8OdfjpnVagp+GPynHJGrjwijilp/WGmJ8LIi2ZKE pOSBLXCGMuzewiNqj7ToLW9UHPxuG7ykIzGR4whMP5tm8vdPP+7ez0Hc2SSKWKHfB9OqJnWyb4x dZBRRXomIoHpLkB4wkGZnBGmE7IeX9oDJ5Z/xUhgeaO6efEARDYsyZcHksb7cMsSqbZvZ1PlIqH CPL+TEDznKjsUha2wwnO4GCNnivrzlDl9ycVcP30MnqG5G/FmLH9WCOkLrGPKGxtMhEj1MPkAOt nCPRKwk4PMvKO8A== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Changes in v2: - Squash .owner removalr patches into one (Johan) - Drop owner from f81534 driver - kerneldoc "module/owner" -> module (Johan) - Fix amba->usb copypasta - Link to v1: https://lore.kernel.org/r/20240328-module-owner-usb-serial-v1-0-bc46c9ffbf56@linaro.org Description =========== Modules registering driver with usb_serial_register_drivers() might forget to set .owner field. Solve the problem by moving this task away from the drivers to the core USB code, just like we did for platform_driver in commit 9447057eaff8 ("platform_device: use a macro instead of platform_driver_register"). Best regards, Krzysztof --- Krzysztof Kozlowski (2): USB: serial: store owner from modules with usb_serial_register_drivers() USB: serial: drop driver owner initialization drivers/usb/serial/aircable.c | 1 - drivers/usb/serial/ark3116.c | 1 - drivers/usb/serial/belkin_sa.c | 1 - drivers/usb/serial/ch341.c | 1 - drivers/usb/serial/cp210x.c | 1 - drivers/usb/serial/cyberjack.c | 1 - drivers/usb/serial/cypress_m8.c | 3 --- drivers/usb/serial/digi_acceleport.c | 2 -- drivers/usb/serial/empeg.c | 1 - drivers/usb/serial/f81232.c | 2 -- drivers/usb/serial/f81534.c | 1 - drivers/usb/serial/ftdi_sio.c | 1 - drivers/usb/serial/garmin_gps.c | 1 - drivers/usb/serial/generic.c | 1 - drivers/usb/serial/io_edgeport.c | 4 ---- drivers/usb/serial/io_ti.c | 2 -- drivers/usb/serial/ipaq.c | 1 - drivers/usb/serial/ipw.c | 1 - drivers/usb/serial/ir-usb.c | 1 - drivers/usb/serial/iuu_phoenix.c | 1 - drivers/usb/serial/keyspan.c | 4 ---- drivers/usb/serial/keyspan_pda.c | 2 -- drivers/usb/serial/kl5kusb105.c | 1 - drivers/usb/serial/kobil_sct.c | 1 - drivers/usb/serial/mct_u232.c | 1 - drivers/usb/serial/metro-usb.c | 1 - drivers/usb/serial/mos7720.c | 1 - drivers/usb/serial/mos7840.c | 1 - drivers/usb/serial/mxuport.c | 1 - drivers/usb/serial/navman.c | 1 - drivers/usb/serial/omninet.c | 1 - drivers/usb/serial/opticon.c | 1 - drivers/usb/serial/option.c | 1 - drivers/usb/serial/oti6858.c | 1 - drivers/usb/serial/pl2303.c | 1 - drivers/usb/serial/qcaux.c | 1 - drivers/usb/serial/qcserial.c | 1 - drivers/usb/serial/quatech2.c | 1 - drivers/usb/serial/safe_serial.c | 1 - drivers/usb/serial/sierra.c | 1 - drivers/usb/serial/spcp8x5.c | 1 - drivers/usb/serial/ssu100.c | 1 - drivers/usb/serial/symbolserial.c | 1 - drivers/usb/serial/ti_usb_3410_5052.c | 2 -- drivers/usb/serial/upd78f0730.c | 1 - drivers/usb/serial/usb-serial-simple.c | 1 - drivers/usb/serial/usb-serial.c | 12 +++++++----- drivers/usb/serial/usb_debug.c | 2 -- drivers/usb/serial/visor.c | 3 --- drivers/usb/serial/whiteheat.c | 2 -- drivers/usb/serial/wishbone-serial.c | 1 - drivers/usb/serial/xr_serial.c | 1 - drivers/usb/serial/xsens_mt.c | 1 - include/linux/usb/serial.h | 7 +++++-- 54 files changed, 12 insertions(+), 76 deletions(-) --- base-commit: 0a5adf0bc8a1c2a6439d632e49471f64f84d3cef change-id: 20240328-module-owner-usb-serial-8a067f622b70 Best regards, -- Krzysztof Kozlowski