From patchwork Sat Oct 6 19:21:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 10629297 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB3361515 for ; Sat, 6 Oct 2018 19:22:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B357328B11 for ; Sat, 6 Oct 2018 19:22:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A587629005; Sat, 6 Oct 2018 19:22:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ED9928B11 for ; Sat, 6 Oct 2018 19:22:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbeJGC0p (ORCPT ); Sat, 6 Oct 2018 22:26:45 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35235 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbeJGC0p (ORCPT ); Sat, 6 Oct 2018 22:26:45 -0400 Received: by mail-wr1-f68.google.com with SMTP id w5-v6so16720543wrt.2 for ; Sat, 06 Oct 2018 12:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=M1wUV4g26wpn+m3KmZeUboHe+b06w58FdInqGvsxZQA=; b=B+uwWRtMUSyfEHLBOfcqzktiBGAsve1T/SqLVahsKTc/S95gko+lQwBXAE9yFzzKE2 4Rq1k97lg3KYbV74CHLNIynBkbn/u8uAQbJ7WyVm8Hhet6/OUaaWTeGpskLkNnXYXHNP cCi46LJ4p4P7SCXMroSNh1/oPv+kkH/qUD+HsJvi/8d9HC8StuOxRZmlk3nSpiAleFA2 5syJeLdpGVskrBiaaWxpPZQW9Q3RXFJc5JhBqdKbSYnDTuQnPYLXRi6QornV6nnVOTVw Y8UpFddNFw7CGzOVktYE0hT+l4R08s7qcmzFtZWepzr0RTeda8G0EoC0TfohDEu1Eeg2 pKJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=M1wUV4g26wpn+m3KmZeUboHe+b06w58FdInqGvsxZQA=; b=seWVvAUYTlPylWO2HNYWnWYCRNStdTKpvWYq56S5MlhiiovIUfxuQpzwhzj/uO/HuU CyD6EJyYzb1511OJlglI8YvHFGkMoCQjzrOT22w28pjc20kIbDmd2I7/WqFuWOnmc7XH eaEKqhXwbUFqDeJd2BOnTdE6OztFCY9e5422d7HbcbVnAvrvnHoSe8qIixQYfzQNPtEL NygwHKQBhA854OUNyccplPTspPkFkxWNzKjT3Ox04cESh2XxNFem7XQosZJQZBF3T0qz FMjzMQPhcbt1lB5oVV5JUbT8I/lTdSCXTpLHUowzUp5F00UlGReywMgC2hsN0xEZkFD0 IdAg== X-Gm-Message-State: ABuFfoiDVDDqx1YpSeJm+hc18j5lIeniuIUFfbuinpiZkIttetszKF4B Xrg+Flk83OWo2yy5WOt3FZo= X-Google-Smtp-Source: ACcGV623fYsyTr7SF9t5TLqFRFaz3reA/8QJyGvzMtSXYoC3q2vXyRCbZtt3oFAhI9kZ1Xc+CfPIbQ== X-Received: by 2002:a5d:4208:: with SMTP id n8-v6mr11239425wrq.260.1538853734511; Sat, 06 Oct 2018 12:22:14 -0700 (PDT) Received: from vdoo.home ([77.124.52.185]) by smtp.gmail.com with ESMTPSA id 77-v6sm12550077wmv.6.2018.10.06.12.22.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Oct 2018 12:22:13 -0700 (PDT) From: Dafna Hirschfeld To: isely@pobox.com, mchehab@kernel.org, helen.koike@collabora.com, hverkuil@xs4all.nl Cc: outreachy-kernel@googlegroups.com, dafna3@gmail.com, Linux Media Mailing List Subject: [PATCH vicodec] media: pvrusb2: replace `printk` with `pr_*` Date: Sat, 6 Oct 2018 22:21:38 +0300 Message-Id: <20181006192138.11349-1-dafna3@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace calls to `printk` with the appropriate `pr_*` macro. Signed-off-by: Dafna Hirschfeld --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 ++++---- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 14 ++++++-------- drivers/media/usb/pvrusb2/pvrusb2-main.c | 4 ++-- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ++-- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c index a8519da0020b..7702285c1519 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -3293,12 +3293,12 @@ void pvr2_hdw_trigger_module_log(struct pvr2_hdw *hdw) int nr = pvr2_hdw_get_unit_number(hdw); LOCK_TAKE(hdw->big_lock); do { - printk(KERN_INFO "pvrusb2: ================= START STATUS CARD #%d =================\n", nr); + pr_info("pvrusb2: ================= START STATUS CARD #%d =================\n", nr); v4l2_device_call_all(&hdw->v4l2_dev, 0, core, log_status); pvr2_trace(PVR2_TRACE_INFO,"cx2341x config:"); cx2341x_log_status(&hdw->enc_ctl_state, "pvrusb2"); pvr2_hdw_state_log_state(hdw); - printk(KERN_INFO "pvrusb2: ================== END STATUS CARD #%d ==================\n", nr); + pr_info("pvrusb2: ================== END STATUS CARD #%d ==================\n", nr); } while (0); LOCK_GIVE(hdw->big_lock); } @@ -4851,7 +4851,7 @@ static void pvr2_hdw_state_log_state(struct pvr2_hdw *hdw) for (idx = 0; ; idx++) { ccnt = pvr2_hdw_report_unlocked(hdw,idx,buf,sizeof(buf)); if (!ccnt) break; - printk(KERN_INFO "%s %.*s\n",hdw->name,ccnt,buf); + pr_info("%s %.*s\n", hdw->name, ccnt, buf); } ccnt = pvr2_hdw_report_clients(hdw, buf, sizeof(buf)); if (ccnt >= sizeof(buf)) @@ -4863,7 +4863,7 @@ static void pvr2_hdw_state_log_state(struct pvr2_hdw *hdw) while ((lcnt + ucnt < ccnt) && (buf[lcnt + ucnt] != '\n')) { lcnt++; } - printk(KERN_INFO "%s %.*s\n", hdw->name, lcnt, buf + ucnt); + pr_info("%s %.*s\n", hdw->name, lcnt, buf + ucnt); ucnt += lcnt + 1; } } diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c index ec7d32759e39..06c7e875fa0f 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c @@ -478,8 +478,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, unsigned int idx,offs,cnt; for (idx = 0; idx < num; idx++) { cnt = msgs[idx].len; - printk(KERN_INFO - "pvrusb2 i2c xfer %u/%u: addr=0x%x len=%d %s", + pr_info("pvrusb2 i2c xfer %u/%u: addr=0x%x len=%d %s", idx+1,num, msgs[idx].addr, cnt, @@ -501,8 +500,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, printk(KERN_CONT "\n"); } if (!num) { - printk(KERN_INFO - "pvrusb2 i2c xfer null transfer result=%d\n", + pr_info("pvrusb2 i2c xfer null transfer result=%d\n", ret); } } @@ -542,14 +540,14 @@ static int do_i2c_probe(struct pvr2_hdw *hdw, int addr) static void do_i2c_scan(struct pvr2_hdw *hdw) { int i; - printk(KERN_INFO "%s: i2c scan beginning\n", hdw->name); + pr_info("%s: i2c scan beginning\n", hdw->name); for (i = 0; i < 128; i++) { if (do_i2c_probe(hdw, i)) { - printk(KERN_INFO "%s: i2c scan: found device @ 0x%x\n", + pr_info("%s: i2c scan: found device @ 0x%x\n", hdw->name, i); } } - printk(KERN_INFO "%s: i2c scan done.\n", hdw->name); + pr_info("%s: i2c scan done.\n", hdw->name); } static void pvr2_i2c_register_ir(struct pvr2_hdw *hdw) @@ -612,7 +610,7 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw) /* However, deal with various special cases for 24xxx hardware. */ if (ir_mode[hdw->unit_number] == 0) { - printk(KERN_INFO "%s: IR disabled\n",hdw->name); + pr_info("%s: IR disabled\n", hdw->name); hdw->i2c_func[0x18] = i2c_black_hole; } else if (ir_mode[hdw->unit_number] == 1) { if (hdw->ir_scheme_active == PVR2_IR_SCHEME_24XXX) { diff --git a/drivers/media/usb/pvrusb2/pvrusb2-main.c b/drivers/media/usb/pvrusb2/pvrusb2-main.c index cbe2c3a22458..23672dd352f5 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-main.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-main.c @@ -132,10 +132,10 @@ static int __init pvr_init(void) ret = usb_register(&pvr_driver); if (ret == 0) - printk(KERN_INFO "pvrusb2: " DRIVER_VERSION ":" + pr_info("pvrusb2: " DRIVER_VERSION ":" DRIVER_DESC "\n"); if (pvrusb2_debug) - printk(KERN_INFO "pvrusb2: Debug mask is %d (0x%x)\n", + pr_info("pvrusb2: Debug mask is %d (0x%x)\n", pvrusb2_debug,pvrusb2_debug); pvr2_trace(PVR2_TRACE_INIT,"pvr_init complete"); diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index cea232a3302d..97a93ed4bcda 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -869,7 +869,7 @@ static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) are gone. */ video_unregister_device(&dip->devbase); - printk(KERN_INFO "%s\n", msg); + pr_info("%s\n", msg); } @@ -1260,7 +1260,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, ": Failed to register pvrusb2 v4l device\n"); } - printk(KERN_INFO "pvrusb2: registered device %s [%s]\n", + pr_info("pvrusb2: registered device %s [%s]\n", video_device_node_name(&dip->devbase), pvr2_config_get_name(dip->config));