mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Andrey Volkov <avolkov@varma-el.com>
Cc: khali@linux-fr.org, lm-sensors@lm-sensors.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Added support of ST m41t85 rtc chip
Date: Mon, 14 Nov 2005 16:41:18 -0800	[thread overview]
Message-ID: <20051114164118.7270c6ce.akpm@osdl.org> (raw)
In-Reply-To: <4378960F.8030800@varma-el.com>

Andrey Volkov <avolkov@varma-el.com> wrote:
>
> ...
> Added support of ST M41T85 RTC
> 
> ...
>
> +ulong
> +m41t85_get_rtc_time(void)

Does this need to have global scope?

It appears to have no callers.

It is preferred that `unsigned long' be used.

Please format it this way:

unsigned long m41t85_get_rtc_time(void)


> +static void
> +m41t85_set_tlet(ulong arg)
> +{
> +	struct rtc_time	tm;
> +	ulong	nowtime = *(ulong *)arg;
> +
> +	to_tm(nowtime, &tm);
> +	tm.tm_year = (tm.tm_year - 1900) % 100;
> +
> +	tm.tm_sec = BIN2BCD(tm.tm_sec);
> +	tm.tm_min = BIN2BCD(tm.tm_min);
> +	tm.tm_hour = BIN2BCD(tm.tm_hour);
> +	tm.tm_mon = BIN2BCD(tm.tm_mon);
> +	tm.tm_mday = BIN2BCD(tm.tm_mday);
> +	tm.tm_year = BIN2BCD(tm.tm_year);
> +
> +	down(&m41t85_mutex);

Cannot do down() in a tasklet handler!  Enable CONFIG_DEBUG_PREEMPT and
CONFIG_DEBUG_SPINLOCK_SLEEP, retest.

schedule_work() might be an appropriate fix.

> +int
> +m41t85_set_rtc_time(ulong nowtime)
> +{
> +	new_time = nowtime;
> +
> +	if (in_interrupt())
> +		tasklet_schedule(&m41t85_tasklet);
> +	else
> +		m41t85_set_tlet((ulong)&new_time);
> +
> +	return 0;
> +}

hm, this function isn't referenced from within this patch either.

> +	#if defined (CONFIG_SENSORS_M41T85_SQW_FRQ)

#if's normally start in column zero.

> +		ret = i2c_smbus_write_byte_data(client, RTC_SQW_ADDR, CONFIG_SENSORS_M41T85_SQW_FRQ);

My, what large xterms you have ;)



  reply	other threads:[~2005-11-15  0:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-14 13:50 Andrey Volkov
2005-11-15  0:41 ` Andrew Morton [this message]
2005-11-15 21:24   ` Andrey Volkov
2005-11-15 20:52 ` Jean Delvare
2005-11-15 21:48   ` Andrey Volkov
2005-11-16  3:15     ` Mark A. Greer
2005-11-16 14:50       ` Andrey Volkov
2005-11-16 18:55       ` Andy Isaacson
2005-11-16 22:24         ` Mark A. Greer
2005-11-18 20:35           ` Mark A. Greer
2005-11-21 12:35             ` Andrey Volkov
2005-12-06 21:18               ` Mark A. Greer
2005-11-16  2:57   ` Mark A. Greer
2005-11-16 14:45     ` Andrey Volkov
2005-11-16 15:19       ` Jean Delvare
2005-11-16 16:43         ` Andrey Volkov
2005-11-16 21:36           ` Mark A. Greer
2005-11-17  9:20           ` Jean Delvare
2005-11-16 21:24         ` Mark A. Greer
2005-12-19 21:03     ` [RFC] i2c: Combined ST m41txx i2c rtc chip driver (was: [PATCH 1/1] Added support of ST m41t85 rtc chip) Mark A. Greer
2005-12-19 21:06       ` Mark A. Greer
2005-12-20 10:05       ` [RFC] i2c: Combined ST m41txx i2c rtc chip driver Andrey Volkov
2005-12-21 21:25         ` Mark A. Greer
     [not found]         ` <20060111000912.GA11471@mag.az.mvista.com>
     [not found]           ` <43C4D275.2070505@varma-el.com>
     [not found]             ` <20060111161954.GB6405@mag.az.mvista.com>
2006-01-11 19:03               ` Andrey Volkov
2006-01-18 22:06                 ` Mark A. Greer
2006-01-19  7:25                   ` Jean Delvare
2006-01-26  2:01                     ` Mark A. Greer
2006-01-26 20:50                       ` Mark A. Greer

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=20051114164118.7270c6ce.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=avolkov@varma-el.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®