From patchwork Mon Nov 26 04:49:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13187 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9C84323EFB for ; Mon, 26 Nov 2012 04:55:40 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4EAC9A192F8 for ; Mon, 26 Nov 2012 04:55:40 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so4033426ieb.11 for ; Sun, 25 Nov 2012 20:55:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=7lT9BB9IrYn5XaNUaFuhGUSL9T1N/4eiOxBSBRyEH+I=; b=o0ruZiorG9ea6cKfeg3b7iT+KJ75INBPRAnicOJ1ZH0JpNq00DLdiigwbpFCQDEAK0 3vDv1IyM2Hwdj1cn9o29KzWhB/dtWmdKbS8UzFWOuya2r6B6wlH2j/m56lwvu2q2HaPe ZY/jAMtz6YijMMfSqIT+p5zs53zQLjL63tzot1YDRsbGtJzxmrLYvXeaIKRFoCZJXKEM kEMhyyqwksno7lt/jTG+OFDZlFj6IRzJcLgby2zruDTtdWZgS/adgYMQzNqH5bMmo1cr MNb/yM5F2J0jQwOuKoP03xJvnaaOj+hV0doRNbTxx0sS8UpiZjkO1hmE9CCdwksIdkh6 SOrg== Received: by 10.50.213.69 with SMTP id nq5mr12378968igc.70.1353905740007; Sun, 25 Nov 2012 20:55:40 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp201129igt; Sun, 25 Nov 2012 20:55:39 -0800 (PST) Received: by 10.68.244.6 with SMTP id xc6mr34306226pbc.94.1353905739418; Sun, 25 Nov 2012 20:55:39 -0800 (PST) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by mx.google.com with ESMTPS id e6si17485412paw.56.2012.11.25.20.55.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 25 Nov 2012 20:55:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.52; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f52.google.com with SMTP id ro2so8589057pbb.39 for ; Sun, 25 Nov 2012 20:55:39 -0800 (PST) Received: by 10.68.229.194 with SMTP id ss2mr34474814pbc.17.1353905739187; Sun, 25 Nov 2012 20:55:39 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id g1sm8082844pax.21.2012.11.25.20.55.36 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 25 Nov 2012 20:55:38 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: t.stanislaws@samsung.com, s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/9] [media] s5p-tv: Add missing braces around sizeof in mixer_video.c Date: Mon, 26 Nov 2012 10:19:01 +0530 Message-Id: <1353905348-15475-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353905348-15475-1-git-send-email-sachin.kamat@linaro.org> References: <1353905348-15475-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQn8kyY5GmoRaEh94urKPR0a6+1L10IsmUgSaYTQBMwk7GeYEWXyPvH9ChGm6wvAU172lziw Silences several checkpatch warnings of the type: WARNING: sizeof *out should be sizeof(*out) FILE: media/platform/s5p-tv/mixer_video.c:98: out = kzalloc(sizeof *out, GFP_KERNEL); Signed-off-by: Sachin Kamat --- drivers/media/platform/s5p-tv/mixer_video.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index 9b52f3a..155c092 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -95,7 +95,7 @@ int __devinit mxr_acquire_video(struct mxr_device *mdev, /* trying to register next output */ if (sd == NULL) continue; - out = kzalloc(sizeof *out, GFP_KERNEL); + out = kzalloc(sizeof(*out), GFP_KERNEL); if (out == NULL) { mxr_err(mdev, "no memory for '%s'\n", conf->output_name); @@ -127,7 +127,7 @@ fail_output: /* kfree is NULL-safe */ for (i = 0; i < mdev->output_cnt; ++i) kfree(mdev->output[i]); - memset(mdev->output, 0, sizeof mdev->output); + memset(mdev->output, 0, sizeof(mdev->output)); fail_vb2_allocator: /* freeing allocator context */ @@ -160,8 +160,8 @@ static int mxr_querycap(struct file *file, void *priv, mxr_dbg(layer->mdev, "%s:%d\n", __func__, __LINE__); - strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof cap->driver); - strlcpy(cap->card, layer->vfd.name, sizeof cap->card); + strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof(cap->driver)); + strlcpy(cap->card, layer->vfd.name, sizeof(cap->card)); sprintf(cap->bus_info, "%d", layer->idx); cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT_MPLANE; cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; @@ -192,7 +192,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer) struct mxr_device *mdev = layer->mdev; struct v4l2_mbus_framefmt mbus_fmt; - memset(&layer->geo, 0, sizeof layer->geo); + memset(&layer->geo, 0, sizeof(layer->geo)); mxr_get_mbus_fmt(mdev, &mbus_fmt); @@ -425,7 +425,7 @@ static int mxr_s_selection(struct file *file, void *fh, struct mxr_geometry tmp; struct v4l2_rect res; - memset(&res, 0, sizeof res); + memset(&res, 0, sizeof(res)); mxr_dbg(layer->mdev, "%s: rect: %dx%d@%d,%d\n", __func__, s->r.width, s->r.height, s->r.left, s->r.top); @@ -464,7 +464,7 @@ static int mxr_s_selection(struct file *file, void *fh, /* apply change and update geometry if needed */ if (target) { /* backup current geometry if setup fails */ - memcpy(&tmp, geo, sizeof tmp); + memcpy(&tmp, geo, sizeof(tmp)); /* apply requested selection */ target->x_offset = s->r.left; @@ -496,7 +496,7 @@ static int mxr_s_selection(struct file *file, void *fh, fail: /* restore old geometry, which is not touched if target is NULL */ if (target) - memcpy(geo, &tmp, sizeof tmp); + memcpy(geo, &tmp, sizeof(tmp)); return -ERANGE; } @@ -1061,7 +1061,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev, { struct mxr_layer *layer; - layer = kzalloc(sizeof *layer, GFP_KERNEL); + layer = kzalloc(sizeof(*layer), GFP_KERNEL); if (layer == NULL) { mxr_err(mdev, "not enough memory for layer.\n"); goto fail;