From patchwork Wed Sep 13 08:57:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9950723 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3F9460245 for ; Wed, 13 Sep 2017 08:58:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E2B2522B for ; Wed, 13 Sep 2017 08:58:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB9D529005; Wed, 13 Sep 2017 08:58:07 +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=-1.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB autolearn=no 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 7025D2522B for ; Wed, 13 Sep 2017 08:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbdIMI6F (ORCPT ); Wed, 13 Sep 2017 04:58:05 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36386 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997AbdIMI6B (ORCPT ); Wed, 13 Sep 2017 04:58:01 -0400 Received: by mail-pf0-f196.google.com with SMTP id f84so7281953pfj.3; Wed, 13 Sep 2017 01:58:01 -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=vSMDvIbX78F82xF+y1TWgkQaePjliddh7j6QqoOk80o=; b=lP2pfDe3ybKrtQfy2xZKcRWgdcLN/+s0VuRdr3XY8Eq6YopK6iUe8KjVsi+rSqghFq gsmK2Li+riw8BsoR3fQUs35wXR44msln5pFQtnhU/nhWzy7U52bufkRryerHvKVfosMA W8uS4GeK7kCPnSq+G/VTDC6ewIoZQwZYmfSJ0MFgDRgfEdHzvbfvnZTN4IAcQHQxdYr9 j8HWoay2iLUorQMOYYBCFVdqGydRlQ8OQwn7Ur46JEHio/uhMXvZihTVUBgun7stguuM t2t72RUupIdX0t2VIlPIxL/1ts31gW24MczGXqSVfRudSDsjP1kPCoS1chcXxjyTrxWH 8wZQ== 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=vSMDvIbX78F82xF+y1TWgkQaePjliddh7j6QqoOk80o=; b=sesup88l9YE9DepLKu9q8CTCu5lGZ5PAqW7BH47/Hnf9W6OSyOdd05b+jNdmprtI4R iJldpXlOQMu+B/IkoCq9Ne3wh3u4U/C2mVsYBmp+rh8KwpZSV4POWAMXz/h/0/Pny5pq 5ri+6bL13qZdkPowuA7nsOJwganJEXG4D2bpwqme+TLVdhPpDXchzmGNgyzYYpjbPx7q 5Hxgjwu4jA47xywaWnxIxqC7JqaUa7ahq9w9Xxnme9pt+EvWaSSoowdvpdm/ME+0Sizq VQawBsA/SHAsDp+0/x6uIJCmBKJANyZ4rZxAC926EOC0am7EQSSHcCiCB1wdRi9BMUtl qJFQ== X-Gm-Message-State: AHPjjUhOFTHjJDj6ofPQQeV0EooxGQuvsYck9809hVpROhotOkwvif8n FuR4hJEiwnLRAWMa1brLBw== X-Google-Smtp-Source: ADKCNb5vOCVjvtcvp2n5bjD9WZLWrLfxARHys8Jo0Ah8JAbgN8jupZbljBDlLNkkfyDJ8mUQMoaxQQ== X-Received: by 10.101.66.139 with SMTP id j11mr17436643pgp.132.1505293080542; Wed, 13 Sep 2017 01:58:00 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id 28sm9905157pfl.14.2017.09.13.01.57.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Sep 2017 01:57:59 -0700 (PDT) From: Allen Pais To: linux-kernel@vger.kernel.org Cc: mchehab@kernel.org, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Allen Pais Subject: [PATCH v3] drivers/staging:[media]atomisp:use ARRAY_SIZE() instead of open coding. Date: Wed, 13 Sep 2017 14:27:53 +0530 Message-Id: <1505293073-27622-1-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 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 Signed-off-by: Allen Pais --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index e882b55..bee3043 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -451,8 +451,6 @@ static enum ia_css_frame_format yuv422_copy_formats[] = { IA_CSS_FRAME_FORMAT_YUYV }; -#define array_length(array) (sizeof(array)/sizeof(array[0])) - /* Verify whether the selected output format is can be produced * by the copy binary given the stream format. * */ @@ -468,7 +466,7 @@ verify_copy_out_frame_format(struct ia_css_pipe *pipe) switch (pipe->stream->config.input_config.format) { case IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY: case IA_CSS_STREAM_FORMAT_YUV420_8: - for (i=0; i