All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <linux@treblig.org>
To: abbotti@mev.co.uk, hsweeten@visionengravers.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] comedi: comedi_8254: Remove unused comedi_8254_ns_to_timer
Date: Thu, 13 Mar 2025 14:06:23 +0000	[thread overview]
Message-ID: <Z9LmXxvc6tA-SPrn@gallifrey> (raw)
In-Reply-To: <ZzPKWeqPhY0miHSC@gallifrey>

* Dr. David Alan Gilbert (linux@treblig.org) wrote:
> * linux@treblig.org (linux@treblig.org) wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > 
> > comedi_8254_ns_to_timer() has been unused since it was added
> > in commit
> > d42b5211d861 ("staging: comedi: comedi_8254: introduce module for 8254 timer support")
> > 
> > Remove it.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> 
> Ping.

Hi,
  I'd appreciate if someone could pick up and review this old cleanup patch.

Thanks,

Dave

> Thanks,
> 
> Dave
> 
> > ---
> >  drivers/comedi/drivers/comedi_8254.c | 37 ----------------------------
> >  include/linux/comedi/comedi_8254.h   |  2 --
> >  2 files changed, 39 deletions(-)
> > 
> > diff --git a/drivers/comedi/drivers/comedi_8254.c b/drivers/comedi/drivers/comedi_8254.c
> > index 6beca2a6d66e..9b7747dab747 100644
> > --- a/drivers/comedi/drivers/comedi_8254.c
> > +++ b/drivers/comedi/drivers/comedi_8254.c
> > @@ -77,10 +77,6 @@
> >   * to create a 32-bit rate generator (I8254_MODE2). These functions are
> >   * provided to handle the cascaded counters:
> >   *
> > - * comedi_8254_ns_to_timer()
> > - *	Calculates the divisor value needed for a single counter to generate
> > - *	ns timing.
> > - *
> >   * comedi_8254_cascade_ns_to_timer()
> >   *	Calculates the two divisor values needed to the generate the pacer
> >   *	clock (in ns).
> > @@ -472,39 +468,6 @@ void comedi_8254_cascade_ns_to_timer(struct comedi_8254 *i8254,
> >  }
> >  EXPORT_SYMBOL_GPL(comedi_8254_cascade_ns_to_timer);
> >  
> > -/**
> > - * comedi_8254_ns_to_timer - calculate the divisor value for nanosec timing
> > - * @i8254:	comedi_8254 struct for the timer
> > - * @nanosec:	the desired ns time
> > - * @flags:	comedi_cmd flags
> > - */
> > -void comedi_8254_ns_to_timer(struct comedi_8254 *i8254,
> > -			     unsigned int *nanosec, unsigned int flags)
> > -{
> > -	unsigned int divisor;
> > -
> > -	switch (flags & CMDF_ROUND_MASK) {
> > -	default:
> > -	case CMDF_ROUND_NEAREST:
> > -		divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base);
> > -		break;
> > -	case CMDF_ROUND_UP:
> > -		divisor = DIV_ROUND_UP(*nanosec, i8254->osc_base);
> > -		break;
> > -	case CMDF_ROUND_DOWN:
> > -		divisor = *nanosec / i8254->osc_base;
> > -		break;
> > -	}
> > -	if (divisor < 2)
> > -		divisor = 2;
> > -	if (divisor > I8254_MAX_COUNT)
> > -		divisor = I8254_MAX_COUNT;
> > -
> > -	*nanosec = divisor * i8254->osc_base;
> > -	i8254->next_div = divisor;
> > -}
> > -EXPORT_SYMBOL_GPL(comedi_8254_ns_to_timer);
> > -
> >  /**
> >   * comedi_8254_set_busy - set/clear the "busy" flag for a given counter
> >   * @i8254:	comedi_8254 struct for the timer
> > diff --git a/include/linux/comedi/comedi_8254.h b/include/linux/comedi/comedi_8254.h
> > index d527f04400df..21be0b7250b4 100644
> > --- a/include/linux/comedi/comedi_8254.h
> > +++ b/include/linux/comedi/comedi_8254.h
> > @@ -129,8 +129,6 @@ void comedi_8254_pacer_enable(struct comedi_8254 *i8254,
> >  void comedi_8254_update_divisors(struct comedi_8254 *i8254);
> >  void comedi_8254_cascade_ns_to_timer(struct comedi_8254 *i8254,
> >  				     unsigned int *nanosec, unsigned int flags);
> > -void comedi_8254_ns_to_timer(struct comedi_8254 *i8254,
> > -			     unsigned int *nanosec, unsigned int flags);
> >  
> >  void comedi_8254_set_busy(struct comedi_8254 *i8254,
> >  			  unsigned int counter, bool busy);
> > -- 
> > 2.47.0
> > 
> -- 
>  -----Open up your eyes, open up your mind, open up your code -------   
> / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
> \        dave @ treblig.org |                               | In Hex /
>  \ _________________________|_____ http://www.treblig.org   |_______/
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

      reply	other threads:[~2025-03-13 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 20:41 [PATCH] comedi: comedi_8254: Remove unused comedi_8254_ns_to_timer linux
2024-11-12 21:36 ` Dr. David Alan Gilbert
2025-03-13 14:06   ` Dr. David Alan Gilbert [this message]

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=Z9LmXxvc6tA-SPrn@gallifrey \
    --to=linux@treblig.org \
    --cc=abbotti@mev.co.uk \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.