LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christopher Leech <christopher.leech@intel.com>
To: Adrian Bunk <bunk@stusta.de>,
	"Williams, Dan J" <dan.j.williams@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] drivers/dma/: no "static inline" in C files
Date: Mon, 26 Feb 2007 10:42:24 -0800	[thread overview]
Message-ID: <1172515344.5504.4.camel@localhost.localdomain> (raw)
In-Reply-To: <20070225231650.GB29575@stusta.de>

Thanks Adrian,

Dan, this applies to your code.  Mind adding it to your tree?

- Chris


On Sun, 2007-02-25 at 15:16 -0800, Adrian Bunk wrote:

This patch changes "static inline"s in C files to "static":
gcc should know best whether or not to inline a static function.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/dma/async_tx.c |   12 ++++++------
 drivers/dma/iop-adma.c |   14 +++++++-------
 2 files changed, 13 insertions(+), 13 deletions(-)

--- linux-2.6.20-mm2/drivers/dma/iop-adma.c.old 2007-02-25 19:16:37.000000000 +0100
+++ linux-2.6.20-mm2/drivers/dma/iop-adma.c     2007-02-25 19:16:58.000000000 +0100
@@ -48,7 +48,7 @@
  * @slot: Slot to free
  * Caller must hold &iop_chan->lock while calling this function
  */
-static inline void iop_adma_free_slots(struct iop_adma_desc_slot *slot)
+static void iop_adma_free_slots(struct iop_adma_desc_slot *slot)
 {
        int stride = slot->stride;

@@ -60,7 +60,7 @@
        }
 }

-static inline dma_cookie_t
+static dma_cookie_t
 iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc,
        struct iop_adma_chan *iop_chan, dma_cookie_t cookie)
 {
@@ -108,7 +108,7 @@
        return cookie;
 }

-static inline int
+static int
 iop_adma_clean_slot(struct iop_adma_desc_slot *desc,
        struct iop_adma_chan *iop_chan)
 {
@@ -260,7 +260,7 @@
        }
 }

-static inline void
+static void
 iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan)
 {
        spin_lock_bh(&iop_chan->lock);
@@ -453,7 +453,7 @@
        return (i > 0) ? i : -ENOMEM;
 }

-static inline dma_cookie_t
+static dma_cookie_t
 iop_desc_assign_cookie(struct iop_adma_chan *iop_chan,
        struct iop_adma_desc_slot *desc)
 {
@@ -465,7 +465,7 @@
        return cookie;
 }

-static inline void iop_adma_check_threshold(struct iop_adma_chan *iop_chan)
+static void iop_adma_check_threshold(struct iop_adma_chan *iop_chan)
 {
        PRINTK("iop adma%d: pending: %d\n", iop_chan->device->id,
                iop_chan->pending);
@@ -719,7 +719,7 @@
        }
 }

-static inline void iop_adma_schedule_cleanup(unsigned long id)
+static void iop_adma_schedule_cleanup(unsigned long id)
 {
        tasklet_schedule(iop_adma_tasklet[id]);
 }
--- linux-2.6.20-mm2/drivers/dma/async_tx.c.old 2007-02-25 19:17:06.000000000 +0100
+++ linux-2.6.20-mm2/drivers/dma/async_tx.c     2007-02-25 19:17:48.000000000 +0100
@@ -66,7 +66,7 @@
        kfree(ref);
 }

-static inline void
+static void
 init_dma_chan_ref(struct dma_chan_ref *ref, struct dma_chan *chan)
 {
        INIT_LIST_HEAD(&ref->async_node);
@@ -316,7 +316,7 @@
        do { } while (0);
 }

-static inline struct dma_chan *
+static struct dma_chan *
 async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx,
        enum dma_transaction_type tx_type)
 {
@@ -324,7 +324,7 @@
 }
 #endif

-static inline void
+static void
 async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx,
        enum async_tx_flags flags, struct dma_async_tx_descriptor *depend_tx,
        dma_async_tx_callback callback, void *callback_param)
@@ -370,7 +370,7 @@
  * @callback: function to call when the transaction completes
  * @callback_param: parameter to pass to the callback routine
  */
-static inline void
+static void
 sync_epilog(unsigned long flags, struct dma_async_tx_descriptor *depend_tx,
        dma_async_tx_callback callback, void *callback_param)
 {
@@ -381,7 +381,7 @@
                async_tx_ack(depend_tx);
 }

-static inline void
+static void
 do_async_xor(struct dma_async_tx_descriptor *tx, struct dma_device *device,
        struct dma_chan *chan, struct page *dest, struct page **src_list,
        unsigned int offset, unsigned int src_cnt, size_t len,
@@ -413,7 +413,7 @@
                callback_param);
 }

-static inline void
+static void
 do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset,
        unsigned int src_cnt, size_t len, enum async_tx_flags flags,
        struct dma_async_tx_descriptor *depend_tx,



  reply	other threads:[~2007-02-26 18:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-25 23:16 Adrian Bunk
2007-02-26 18:42 ` Christopher Leech [this message]
2007-02-26 22:53   ` Williams, Dan J

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172515344.5504.4.camel@localhost.localdomain \
    --to=christopher.leech@intel.com \
    --cc=bunk@stusta.de \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [2.6 patch] drivers/dma/: no "static inline" in C files' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).