From patchwork Tue Nov 21 09:22:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 13462661 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 674251FA7; Tue, 21 Nov 2023 09:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EdBxAV7T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18901C433CA; Tue, 21 Nov 2023 09:23:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700558599; bh=9PpdhyBVsu45ZCI81VGErhQfiGGxB/f1DEh5vaZ3fm8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EdBxAV7TZbxSuBj60zoJAneC4IgZRVvo2sHh/6D4pz5ADsXfKZA5QMskKPFDr2B21 oCKJ9/YwuqeOpqa83og/tUyjhUgQ9RgHZr3yuB7eG9hMig0QjfE0URzhU8WtjVkiVe KZHyJz/eH3hNcqfJSyBj9Y8XnN6uvO1RpyhN9Eg4kRSbhA/pmUM4/sGe7KRGmtbogo PmVVy5nHHmDbXaJgmjishZYFwYdirQmhuX1FArM1mQeLSOLt11wJV9VYxUlluFLwOk JIZ+KunqutGepha4LK3HN10iz7yCPOb6IJqMDNheXVqW9IHM7Ei4CfHFetByJn0AOW c1eoOhGTjT2gQ== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-usb@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 09/17] tty: hso: don't emit load/unload info to the log Date: Tue, 21 Nov 2023 10:22:50 +0100 Message-ID: <20231121092258.9334-10-jirislaby@kernel.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231121092258.9334-1-jirislaby@kernel.org> References: <20231121092258.9334-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org It's preferred NOT to emit anything during the module load and unload (in case the un/load was successful). So drop these prints from hso along with global 'version'. It even contains no version after all. Signed-off-by: Jiri Slaby (SUSE) Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski --- drivers/net/usb/hso.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 83b8452220ec..48450fe861ad 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -363,7 +363,6 @@ static int disable_net; /* driver info */ static const char driver_name[] = "hso"; static const char tty_filename[] = "ttyHS"; -static const char *version = __FILE__ ": " MOD_AUTHOR; /* the usb driver itself (registered in hso_init) */ static struct usb_driver hso_driver; /* serial structures */ @@ -3231,9 +3230,6 @@ static int __init hso_init(void) int i; int result; - /* put it in the log */ - pr_info("%s\n", version); - /* Initialise the serial table semaphore and table */ for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) serial_table[i] = NULL; @@ -3285,8 +3281,6 @@ static int __init hso_init(void) static void __exit hso_exit(void) { - pr_info("unloaded\n"); - tty_unregister_driver(tty_drv); /* deregister the usb driver */ usb_deregister(&hso_driver); From patchwork Tue Nov 21 09:22:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 13462662 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 130213B7B7; Tue, 21 Nov 2023 09:23:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="joL4lNee" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEBE8C433CD; Tue, 21 Nov 2023 09:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700558601; bh=J9+0GAdeqi0Ihu8k/yKWMGuJLA+L/8D5q4AyXvnWFUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=joL4lNeeXdT8sgymVjfPxJdGEgdmJMXdx1lxwxLRpzs9JPGNAmnht0AnabfVbu479 1k/dvSQKu37gIQKySa8+yCQv4AO5mmQhV5b4sb6aSxTgWlDMoJwGSUUwUU1dN/kVGe wrRTKvMy8ZwK2sDFLF7bdedr8jBGVSU5t/USoo+hTzaDcVOraZJ2mSPXKio9X6Ksbz M/5DphpvnwANBpsAoI3OZoTNVz1kbiPX/Apb+tQP+cTpipXiCpTySfnOeAmTIc5qAE FOrggxWRY9i/kzp+EHW6TuOWdKfcWDxeQlgaKpBpfiERpVNGqxt+liG/CtpuSLRrq5 FRaTfyApDjMVQ== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-usb@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 10/17] tty: hso: don't initialize global serial_table Date: Tue, 21 Nov 2023 10:22:51 +0100 Message-ID: <20231121092258.9334-11-jirislaby@kernel.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231121092258.9334-1-jirislaby@kernel.org> References: <20231121092258.9334-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 'serial_table' is global, so there is no need to initialize it to NULLs at the module load. Drop this unneeded for loop. Signed-off-by: Jiri Slaby (SUSE) Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski --- drivers/net/usb/hso.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 48450fe861ad..f088ea2ba6f3 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -3227,13 +3227,8 @@ static struct usb_driver hso_driver = { static int __init hso_init(void) { - int i; int result; - /* Initialise the serial table semaphore and table */ - for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) - serial_table[i] = NULL; - /* allocate our driver using the proper amount of supported minors */ tty_drv = tty_alloc_driver(HSO_SERIAL_TTY_MINORS, TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV);