From patchwork Thu Apr 5 21:35:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10325479 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 D96B060541 for ; Thu, 5 Apr 2018 21:35:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7028293F6 for ; Thu, 5 Apr 2018 21:35:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B89B5293F8; Thu, 5 Apr 2018 21:35:10 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 31413293F6 for ; Thu, 5 Apr 2018 21:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751417AbeDEVfI (ORCPT ); Thu, 5 Apr 2018 17:35:08 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:38850 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbeDEVfH (ORCPT ); Thu, 5 Apr 2018 17:35:07 -0400 Received: by mail-qt0-f195.google.com with SMTP id z23so27854196qti.5 for ; Thu, 05 Apr 2018 14:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=VZ6sTQjI1qRc3zRYgNhMCbkR09Q4Jz4I35NNH5ebEEs=; b=Tf7ObLFvWa8RonWzqSN6xGboDK2O7X7c05otO+szqRCKkKTi6GAcCUEczRPg0B9VaZ vcAA5ko3ozbRIp7HjP3oBQCK4wUdo4/EtVhG5Hdii2puvt/U1fXgk7X1qVvQZKfHjD9S BrI2qTJbloEGzIl242IqalfIHxeikM3eS2ZAB+8TwiPmry4uTbiQ8TnVTlmXOhlx/XDH aizPdzzn1I+OL1wjy8BKMwmetpv+ABCRYF4CgIXafbadCOFoKW8WT38ynjKVNTmh5r2R mtiHuvCaPBpdpPuszTWROkgB/DXdDStrnoqm1UWncdpxhj1zDIcEdKA8N+2NRiYwhizq 4H0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=VZ6sTQjI1qRc3zRYgNhMCbkR09Q4Jz4I35NNH5ebEEs=; b=gHTTB6igMXlsg0IFDfoNBoHqY2m6FZpZzO41tiLqHXkmiqCrOLDtBn8riJE+6sA9o7 18wPWc1ht0Jg0pvlSYakNNKz26pThLkLxAk4cSfkVotRlv10sRupd2BXXSh9keaY7snR bR3JIGrkG4mdsnahNTQRzUQTELGjgm4SJAwPGfgRM1hFnnfCWcajxju/SRBekp4R6nGL op7vqscZFsjfq3cdiPh0lEpZc8Vi3ZjlCfmPy6ID8pxRgjhTDZ78whJfmQRaHQp/xAsd OVZKyt+33NdzgJiWCvE5+JUoYULC9Ql7apZbIlEVl5gK2jRUCGdVUbFcq+uloLkt3MGo euEw== X-Gm-Message-State: ALQs6tC3fMae6VksdXYf8Ecoj5jXQEmOxnfbtF8RoucILpc+SLUenNUM CYDb+F+gd7UTjLBaGB/D86nXn3ZUvsjjILNC0uA= X-Google-Smtp-Source: AIpwx49QenDUkjUghS1QradAMgnmQAu5TT+aAUze3WISvH0JbC7oNONGGfSTVcsSNUlemdQI6zfpHbBdp/EQrpHB1KA= X-Received: by 10.200.18.71 with SMTP id g7mr34432171qtj.35.1522964107001; Thu, 05 Apr 2018 14:35:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Thu, 5 Apr 2018 14:35:06 -0700 (PDT) In-Reply-To: <24a526280e4eb319147908ccab786e2ebc8f8076.1522949748.git.mchehab@s-opensource.com> References: <24a526280e4eb319147908ccab786e2ebc8f8076.1522949748.git.mchehab@s-opensource.com> From: Arnd Bergmann Date: Thu, 5 Apr 2018 23:35:06 +0200 X-Google-Sender-Auth: Joz-QHfzqmywA7c8oXaO0pmBBuc Message-ID: Subject: Re: [PATCH 05/16] media: fsl-viu: allow building it with COMPILE_TEST To: Mauro Carvalho Chehab Cc: Linux Media Mailing List , Mauro Carvalho Chehab , Hans Verkuil , Stanimir Varbanov , Benjamin Gaignard , Ramesh Shanmugasundaram , Al Viro , Bhumika Goyal , Arvind Yadav , Kees Cook , Geliang Tang 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 On Thu, Apr 5, 2018 at 7:54 PM, Mauro Carvalho Chehab wrote: > There aren't many things that would be needed to allow it > to build with compile test. > +/* Allow building this driver with COMPILE_TEST */ > +#ifndef CONFIG_PPC_MPC512x > +#define NO_IRQ 0 The NO_IRQ usage here really needs to die. The portable way to do this is the simpler > +#define out_be32(v, a) writel(a, v) > +#define in_be32(a) readl(a) This does get it to compile, but looks confusing because it mixes up the endianess. I'd suggest doing it like #ifndef CONFIG_PPC #define out_be32(v, a) iowrite32be(a, v) #define in_be32(a) ioread32be(a) #endif Arnd diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 200c47c69a75..707bda89b4f7 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -1407,7 +1407,7 @@ static int viu_of_probe(struct platform_device *op) } viu_irq = irq_of_parse_and_map(op->dev.of_node, 0); - if (viu_irq == NO_IRQ) { + if (!viu_irq) { dev_err(&op->dev, "Error while mapping the irq\n"); return -EINVAL; }