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=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 B9493C433E2 for ; Thu, 14 May 2020 09:53:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FD6A20671 for ; Thu, 14 May 2020 09:53:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="l1Q5WKaB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726113AbgENJxG (ORCPT ); Thu, 14 May 2020 05:53:06 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:51736 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbgENJxF (ORCPT ); Thu, 14 May 2020 05:53:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1589449984; x=1620985984; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=XaiyOzJbm9tSQ61/hL3KmBzEmbAKGicNIZ5Lz5YPXeg=; b=l1Q5WKaBgiZwh6ATgg3FQuJX5Ka1KCSOqHzdY6VqcbYWhELg0/Mv56K6 MT5it9qINCcA+OVxCQJgdAJLzFF5kIjk8zGAUG4KYFfQnXeX1/tzR4TgN QUbUP82vLw4A/ct3NteueoEwu5rgBX7Bj3M2wmCh43qr/5j65xMTOc4Jt sFiyVq+KMq2CdfB3ClQuCkuZ6NUWSwm76URyGIcEYkqMv0extVTWChPKx fPtjnjkikr6YMspAE2TaTgggcyEs7wAtoaySpzBkqjpjsezWL/76sAaUy bsZknVwJCZiwWh84QFvcOOuR6jpIo9GMfxTtjO4sd3YV1SaVvQszP7jdN Q==; IronPort-SDR: R/pp8qEZdCEbOKg1Aa/xvbar2wtBHLJSFk+z6KsvVsFkSuSj/dDfV/BqfIzHKMJ/awhPK9rnfP VITdidjD2a4XR2/aUQUa3FyJw45H5EBHUWV2JQojx3YMoW2LhSJCk6WgbrWVR2Mp46oTIcu8pY e4TZTxttgz0CYNocnP7f2DdGNAt1tKX3ym7eIFLhmOq7ehyRl6oj67GAvtjWtm96xfCogVb/HE U0EdToCKDKKUEH+/PG+//0k33GwGow5pRSikBQJHFH5lr4/jFVKrNbFPBR9mefymiLmtc98VPi zsc= X-IronPort-AV: E=Sophos;i="5.73,390,1583218800"; d="scan'208";a="76630476" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 May 2020 02:53:03 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 14 May 2020 02:53:02 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Thu, 14 May 2020 02:53:01 -0700 From: Christian Gromm To: CC: , , Christian Gromm Subject: [PATCH v2 2/8] drivers: most: usb: use dev_*() functions to print messages Date: Thu, 14 May 2020 11:52:50 +0200 Message-ID: <1589449976-11378-3-git-send-email-christian.gromm@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589449976-11378-1-git-send-email-christian.gromm@microchip.com> References: <1589449976-11378-1-git-send-email-christian.gromm@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This patch removes the pr_*() functions and uses dev_*() instead. Signed-off-by: Christian Gromm Reported-by: Greg Kroah-Hartman --- v2: drivers/most/most_usb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/most/most_usb.c b/drivers/most/most_usb.c index daa5e4b..0846b38 100644 --- a/drivers/most/most_usb.c +++ b/drivers/most/most_usb.c @@ -5,7 +5,6 @@ * Copyright (C) 2013-2015 Microchip Technology Germany II GmbH & Co. KG */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include #include @@ -186,13 +185,14 @@ static inline int start_sync_ep(struct usb_device *usb_dev, u16 ep) * get_stream_frame_size - calculate frame size of current configuration * @cfg: channel configuration */ -static unsigned int get_stream_frame_size(struct most_channel_config *cfg) +static unsigned int get_stream_frame_size(struct most_channel_config *cfg, + struct device *dev) { unsigned int frame_size = 0; unsigned int sub_size = cfg->subbuffer_size; if (!sub_size) { - pr_warn("Misconfig: Subbuffer size zero.\n"); + dev_warn(dev, "Misconfig: Subbuffer size zero.\n"); return frame_size; } switch (cfg->data_type) { @@ -201,7 +201,7 @@ static unsigned int get_stream_frame_size(struct most_channel_config *cfg) break; case MOST_CH_SYNC: if (cfg->packets_per_xact == 0) { - pr_warn("Misconfig: Packets per XACT zero\n"); + dev_warn(dev, "Misconfig: Packets per XACT zero\n"); frame_size = 0; } else if (cfg->packets_per_xact == 0xFF) { frame_size = (USB_MTU / sub_size) * sub_size; @@ -210,7 +210,7 @@ static unsigned int get_stream_frame_size(struct most_channel_config *cfg) } break; default: - pr_warn("Query frame size of non-streaming channel\n"); + dev_warn(dev, "Query frame size of non-streaming channel\n"); break; } return frame_size; @@ -270,7 +270,7 @@ static int hdm_poison_channel(struct most_interface *iface, int channel) static int hdm_add_padding(struct most_dev *mdev, int channel, struct mbo *mbo) { struct most_channel_config *conf = &mdev->conf[channel]; - unsigned int frame_size = get_stream_frame_size(conf); + unsigned int frame_size = get_stream_frame_size(conf, &mdev->dev); unsigned int j, num_frames; if (!frame_size) @@ -304,7 +304,7 @@ static int hdm_remove_padding(struct most_dev *mdev, int channel, struct mbo *mbo) { struct most_channel_config *const conf = &mdev->conf[channel]; - unsigned int frame_size = get_stream_frame_size(conf); + unsigned int frame_size = get_stream_frame_size(conf, &mdev->dev); unsigned int j, num_frames; if (!frame_size) @@ -696,7 +696,7 @@ static int hdm_configure_channel(struct most_interface *iface, int channel, mdev->padding_active[channel] = true; - frame_size = get_stream_frame_size(conf); + frame_size = get_stream_frame_size(conf, &mdev->dev); if (frame_size == 0 || frame_size > USB_MTU) { dev_warn(dev, "Misconfig: frame size wrong\n"); return -EINVAL; -- 2.7.4