From patchwork Wed Nov 16 09:04:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 82455 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp56499obn; Wed, 16 Nov 2016 01:05:37 -0800 (PST) X-Received: by 10.98.14.82 with SMTP id w79mr2950928pfi.153.1479287137660; Wed, 16 Nov 2016 01:05:37 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si30916613pga.235.2016.11.16.01.05.37; Wed, 16 Nov 2016 01:05:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933750AbcKPJFg (ORCPT + 4 others); Wed, 16 Nov 2016 04:05:36 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57066 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934094AbcKPJFY (ORCPT ); Wed, 16 Nov 2016 04:05:24 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGQ00EI198VFR80@mailout1.w1.samsung.com>; Wed, 16 Nov 2016 09:05:19 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161116090519eucas1p2ebe899121e359bc2802d24a12994b9fe~He8wrcz910951009510eucas1p2r; Wed, 16 Nov 2016 09:05:19 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 35.8B.19540.F412C285; Wed, 16 Nov 2016 09:05:19 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161116090518eucas1p17c506d8c8282f852cb3f4f10c5f82fa0~He8v6JYAa2251122511eucas1p1i; Wed, 16 Nov 2016 09:05:18 +0000 (GMT) X-AuditID: cbfec7f5-f79ce6d000004c54-84-582c214ff655 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5A.4A.07726.4512C285; Wed, 16 Nov 2016 09:05:24 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGQ00GDL98JU960@eusync2.samsung.com>; Wed, 16 Nov 2016 09:05:18 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Seung-Woo Kim , Bartlomiej Zolnierkiewicz , Javier Martinez Canillas , Andrzej Hajda , Inki Dae Subject: [PATCH 2/9] s5p-mfc: Use printk_ratelimited for reporting ioctl errors Date: Wed, 16 Nov 2016 10:04:51 +0100 Message-id: <1479287098-30493-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1479287098-30493-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCIsWRmVeSWpSXmKPExsWy7djP87r+ijoRBmuPc1vcWneO1WLjjPWs FpPuT2CxePN2DZPF+fMb2C16NmxltZhxfh+Txdojd9ktDr9pB3Inv2Rz4PLYtKqTzWNL/112 j74tqxg9Pm+SC2CJ4rJJSc3JLEst0rdL4MrY9Gwrc8FZwYrVG44zNzA+4eti5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SZ97t ZwJJCAv4S3yfNgesgUVAVeLp5ztgDbwCHhK33z5lg1gnJ3Hy2GRWEJtTwFPiycxXQPUcQNs8 JJYfNZ3AyLuAkWEVo0hqaXFuem6xoV5xYm5xaV66XnJ+7iZGYIBvO/Zz8w7GSxuDDzEKcDAq 8fAuUNeOEGJNLCuuzD3EKMHBrCTCe11QJ0KINyWxsiq1KD++qDQntfgQoynQTROZpUST84HR l1cSb2hiaG5paGRsYWFuZKQkzlvy4Uq4kEB6YklqdmpqQWoRTB8TB6dUA6OjMsPHnWkdB4K+ XnLffSnhofHUSv7NTybvMW+Yy6omOM/z7DmVaU+/frQpEAhMMWmv4DOzytzZN6mo6CtnLeMM 31PH+X+KMN6fFf1Hq+i6rUW3ZWhh8pbfLCURt99U9D9h+fN7//ykjXMv6upcjiiV3ixz75oS W6iY5slda2tTBC8cj18VfFuJpTgj0VCLuag4EQB5kU7FhgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161116090518eucas1p17c506d8c8282f852cb3f4f10c5f82fa0 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161116090518eucas1p17c506d8c8282f852cb3f4f10c5f82fa0 X-RootMTR: 20161116090518eucas1p17c506d8c8282f852cb3f4f10c5f82fa0 References: <1479287098-30493-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Some applications doesn't check error codes from QBUF/DQBUF ioctls, so don't spam kernel log with errors if they fall into endless loop trying to queue next buffer after a failure. Signed-off-by: Marek Szyprowski --- drivers/media/platform/s5p-mfc/s5p_mfc_debug.h | 6 ++++++ drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_debug.h b/drivers/media/platform/s5p-mfc/s5p_mfc_debug.h index 5936923c631c..1936a5b868f5 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_debug.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_debug.h @@ -39,6 +39,12 @@ __func__, __LINE__, ##args); \ } while (0) +#define mfc_err_limited(fmt, args...) \ + do { \ + printk_ratelimited(KERN_ERR "%s:%d: " fmt, \ + __func__, __LINE__, ##args); \ + } while (0) + #define mfc_info(fmt, args...) \ do { \ printk(KERN_INFO "%s:%d: " fmt, \ diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 52081ddc9bf2..47aceacee169 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -642,7 +642,7 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf) int ret; if (ctx->state == MFCINST_ERROR) { - mfc_err("Call on DQBUF after unrecoverable error\n"); + mfc_err_limited("Call on DQBUF after unrecoverable error\n"); return -EIO; } diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index fcc2e054c61f..e39d9e06e299 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c @@ -1268,7 +1268,7 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf) int ret; if (ctx->state == MFCINST_ERROR) { - mfc_err("Call on DQBUF after unrecoverable error\n"); + mfc_err_limited("Call on DQBUF after unrecoverable error\n"); return -EIO; } if (buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {