Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp626607ybt; Wed, 1 Jul 2020 06:32:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwjOxsVpsHSdzxlujGiWh+E+7y51RwZOaBcFWikiZ4Z1c5Qdw9L4HWRTXsJxRmnJjXy+l/ X-Received: by 2002:a50:cc8a:: with SMTP id q10mr29809997edi.257.1593610346688; Wed, 01 Jul 2020 06:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593610346; cv=none; d=google.com; s=arc-20160816; b=U+ZXDuh8ZJFt15/7IeqtOJmTuPOcvDnEU0IgBGrQgvDurjqke7/VHg4cKLBTmu1zhu ysHRd30RsyoWDXFUtot2bPeWJNpB4Q+JzEpn4VJRbEwO1OcNgyUHlPfxVcUUNfrl4oTe 4ssGIYj2FIA2EPStv2SYziy9Zesx4dqXn6KOo3BCkMlTlhnEBK4jE7fmnpbkMT51xBsQ 41DGisgLk+gblEakayku58UGny5lQXZJaVET2wH6Ck1bMVPdN2ltUmALHR8RlAJprr4r 2Ex+dU7MdXa7QWGZYp5foESqeKTDZD/PkUYuvh8VOMq9k9W2xRpPQF0n+bZWtBC6C1Q3 ptUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=45mvoeQBux3MWSaz6RzR2PRZkBysjO6mMNQF+8/LBaQ=; b=vCo0CIBsId+zVh04sU06akbCypmb4vAU8r6ukIHVG2LNNgZxtpopiFXsjw/gaY5/qi bjJPSlaRt+9tGB8zNwjeXbIXlu0VPhtCDwDDGPO0VWYE1ZHZFPwn+Opyr4xm0sb7QB6R hTrgvasml7id2e8trXX0LlpW6ysw0KdZPJhHWDKjpbwagHoIyG0IXieKluAKTqcGx+Cj LOJI2C3KriR67Y08/htrM3S1WOLovE5MF+4QuaIeptpRoceL9O2+CpIhtqFmFx7zxBp/ c/OEZc+OoDJYvvvR4UVo9Fdu4DcRBs5Os5Zh260TqN+xbXVRxJdhqi54apsufFCKv+Ik a7WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=QBcptKTv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=iitr.ac.in Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nw19si1318138ejb.264.2020.07.01.06.32.02; Wed, 01 Jul 2020 06:32:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=QBcptKTv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=iitr.ac.in Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731039AbgGAN3y (ORCPT + 99 others); Wed, 1 Jul 2020 09:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731003AbgGAN3v (ORCPT ); Wed, 1 Jul 2020 09:29:51 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 435BAC08C5DB for ; Wed, 1 Jul 2020 06:29:51 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id z5so11718991pgb.6 for ; Wed, 01 Jul 2020 06:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=45mvoeQBux3MWSaz6RzR2PRZkBysjO6mMNQF+8/LBaQ=; b=QBcptKTvxEQN+V/Do4Qokuk1wXiQmIso8OCQ3nTgj0q0MIIPYmUwPCemDz8nR59JDy RCA3mjY79KrlqCY7qzWWNpzODm93bbsavVdESkYepz43+rgcm6PulCOus37a0fUMz4Rq Y6FzG73J8+UjhNRgrvWvHblFiv2cRrubquxCC8q2xqdVp2kaY3m3oCoQMMut7KP/rSev 6Eb7sBI+AM8Yb4bNu2yKbffciDmX/aYUPKL7qUSroUcYTE80g76F6zMRMe/3zC+rk9ap 4DFKRhmiDdrNLShGSvbVTTCV6DBczyvpHLxuFyD4h4FGXfC1HNXujLAQm2FQuqexWQI5 Jijg== 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:in-reply-to :references; bh=45mvoeQBux3MWSaz6RzR2PRZkBysjO6mMNQF+8/LBaQ=; b=B9Wqr49a/OBbIt6e6e7ZRlxjk/MDhHu5oQZrqdSPDXW4gOOrVaZToQ90csTM5k1qJH K5KCWvUX0Umg1EU76uojTOBYfoDNhgCpkkjN9UG3J/QTosq/hxtJm6baJaBEmb8oyLUf W98qct8WbaJXavM7SJ2VQWj8GHRQQXzVzHd4Ccy9ycOS+zPPe+hVLBMnuHJvJxYJVfBe H/c1QOVchZ336vreNVFrE0Hi8bjzQ3/CbNlY+F3xdqXed13fW8gi6bQZyOLLcgYXmQel aYh9NU5tc2J3+s7+7W98nS9G51heUnEWCzAIxG9ySBT2xVbmcvdP9DwV/tQ7IzH0ydkM 69ZQ== X-Gm-Message-State: AOAM531JytKrSjr5nx5p8YXC19+C/jo7iDgoxXBej/CuzHplqSoiMpPN slHmbtHMZlt2clR1lTAFmxOkvw== X-Received: by 2002:a63:d944:: with SMTP id e4mr19775924pgj.376.1593610190696; Wed, 01 Jul 2020 06:29:50 -0700 (PDT) Received: from kaaira-HP-Pavilion-Notebook ([103.113.213.178]) by smtp.gmail.com with ESMTPSA id p12sm6036493pgk.40.2020.07.01.06.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 06:29:49 -0700 (PDT) From: Kaaira Gupta To: Helen Koike , Shuah Khan , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham , hverkuil@xs4all.nl Cc: Kaaira Gupta Subject: [PATCH v9 1/3] media: tpg: change char argument to const char Date: Wed, 1 Jul 2020 18:59:38 +0530 Message-Id: <20200701132940.21257-2-kgupta@es.iitr.ac.in> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701132940.21257-1-kgupta@es.iitr.ac.in> References: <20200701132940.21257-1-kgupta@es.iitr.ac.in> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change the argument of type char * to const char * for function tpg_gen_text(). This function should take in a const char pointer as opposed to a char * as there is no modification. This issue was found while passing the order of colors of tpg generated test image (which is a const char *) to this function. Signed-off-by: Kaaira Gupta Reviewed-by: Helen Koike --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 10 +++++----- include/media/tpg/v4l2-tpg.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c index 50f1e0b28b25..dde22a4cbd6c 100644 --- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c +++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c @@ -1927,34 +1927,34 @@ typedef struct { u16 __; u8 _; } __packed x24; static noinline void tpg_print_str_2(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2], unsigned p, unsigned first, unsigned div, unsigned step, - int y, int x, char *text, unsigned len) + int y, int x, const char *text, unsigned len) { PRINTSTR(u8); } static noinline void tpg_print_str_4(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2], unsigned p, unsigned first, unsigned div, unsigned step, - int y, int x, char *text, unsigned len) + int y, int x, const char *text, unsigned len) { PRINTSTR(u16); } static noinline void tpg_print_str_6(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2], unsigned p, unsigned first, unsigned div, unsigned step, - int y, int x, char *text, unsigned len) + int y, int x, const char *text, unsigned len) { PRINTSTR(x24); } static noinline void tpg_print_str_8(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2], unsigned p, unsigned first, unsigned div, unsigned step, - int y, int x, char *text, unsigned len) + int y, int x, const char *text, unsigned len) { PRINTSTR(u32); } void tpg_gen_text(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2], - int y, int x, char *text) + int y, int x, const char *text) { unsigned step = V4L2_FIELD_HAS_T_OR_B(tpg->field) ? 2 : 1; unsigned div = step; diff --git a/include/media/tpg/v4l2-tpg.h b/include/media/tpg/v4l2-tpg.h index eb191e85d363..9749ed409856 100644 --- a/include/media/tpg/v4l2-tpg.h +++ b/include/media/tpg/v4l2-tpg.h @@ -241,7 +241,7 @@ void tpg_log_status(struct tpg_data *tpg); void tpg_set_font(const u8 *f); void tpg_gen_text(const struct tpg_data *tpg, - u8 *basep[TPG_MAX_PLANES][2], int y, int x, char *text); + u8 *basep[TPG_MAX_PLANES][2], int y, int x, const char *text); void tpg_calc_text_basep(struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2], unsigned p, u8 *vbuf); unsigned tpg_g_interleaved_plane(const struct tpg_data *tpg, unsigned buf_line); -- 2.17.1