Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4671204ybf; Wed, 4 Mar 2020 08:24:22 -0800 (PST) X-Google-Smtp-Source: ADFU+vu2HhRtQwmHEnuV6jL7HxZGFngM1oFoBI8T5ipuGqexWGgWEn9MzXS5H0RCGMtOemumSMSv X-Received: by 2002:a05:6808:aaf:: with SMTP id r15mr2213896oij.124.1583339061618; Wed, 04 Mar 2020 08:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583339061; cv=none; d=google.com; s=arc-20160816; b=zDlKdwblzOASZW5LR9wOKbDv25t3UEnL/76vDWoSa0Cwh5377QWaL6TT+Kg3oETfCc vh/zFmgWPRpvk+/K5/g1Dp7LAVDwgcZjdwrDrT92NmbunMWguSXwkgtjFV84SCEhGF03 qG2ThDKGtQfHxWlwCPNQKtD2+x8nCGqmAcoGT7xYhAuv0gzJ5kap6xPLHfJTFGX4I11/ taUAXIPY3fNST9ySlhyHU8Cciwuoiz4ebT8GA4ah5BkUaXnNnt5OTWNs40LV8NQPI8kK 71RNXd6dZ5Wp3l3IyNtaK2pr8KIbLaBKnFKhoAeHvuFN/mW78n9bw+lILfZNVFJ+Nz2g C/vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id; bh=g2oncIFaFT0B1t5r435c8uE4gCu6w58UdFb/iq5nfwc=; b=XicqzNW4ywZQMP6j8eYxeF+jJhhY+DgB76AOu9HEVyL6h+dadEB7FWYfzfGmcEZ+qM Iots16aX8kC3EWOsHNLdsESxVaymk424hVbJsv8RTKTs36woFxuwAwdIVrDpdqS9E5S2 HvGRj6O8O3lL4RA2ggnDXBQg+PCXnXCC7lYGRlwmVzeV/dJI+ivP39DI0IFFXvmZ8iWg bFUn6PKn9eOb1k3THpj4UbwwEjNKqjVjjXaCUEhAXRV9OUOWt96HLsmsMsBeuRcLA4QS DEtY2Ri26OgRcF5OtbLkIeOSiMpDSMNqT/Hju5VLj26udTQrFkL2jXSSc8oswzvmvKXN MzWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22si1420523otc.167.2020.03.04.08.24.09; Wed, 04 Mar 2020 08:24:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729837AbgCDQX5 (ORCPT + 99 others); Wed, 4 Mar 2020 11:23:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:42028 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728278AbgCDQX5 (ORCPT ); Wed, 4 Mar 2020 11:23:57 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id ACA2EAC67; Wed, 4 Mar 2020 16:23:55 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id D8D8EE037F; Wed, 4 Mar 2020 17:23:54 +0100 (CET) Message-Id: From: Michal Kubecek Subject: [PATCH net-next 0/5] tun: debug messages cleanup To: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Date: Wed, 4 Mar 2020 17:23:54 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While testing ethtool output for "strange" devices, I noticed confusing and obviously incorrect message level information for a tun device and sent a quick fix. The result of the upstream discussion was that tun driver would rather deserve a more complex cleanup of the way it handles debug messages. The main problem is that all debugging statements and setting of message level are controlled by TUN_DEBUG macro which is only defined if one edits the source and rebuilds the module, otherwise all DBG1() and tun_debug() statements do nothing. This series drops the TUN_DEBUG switch and replaces custom tun_debug() macro with standard netif_info() so that message level (mask) set and displayed using ethtool works as expected. Some debugging messages are dropped as they only notify about entering a function which can be done easily using ftrace or kprobe. Patch 1 is a trivial fix for compilation warning with W=1. Michal Kubecek (5): tun: fix misleading comment format tun: get rid of DBG1() macro tun: drop useless debugging statements tun: replace tun_debug() by netif_info() tun: drop TUN_DEBUG and tun_debug() drivers/net/tun.c | 105 ++++++++++++---------------------------------- 1 file changed, 27 insertions(+), 78 deletions(-) -- 2.25.1