Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90181136 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller
Browse files

sparc64: Use unsigned long long for u64.



Andrew Morton wrote:

    People keep on doing

            printk("%llu", some_u64);

    testing it only on x86_64 and this generates a warning storm on
    powerpc, sparc64, etc.  Because they use `long', not `long long'.

    Quite a few 64-bit architectures are using `long' for their
    s64/u64 types.  We should convert them all to `long long'.

Update types.h so we use unsigned long long for u64 and
fix all warnings in sparc64 code.
Tested with an allnoconfig, defconfig and allmodconfig builds.

This patch introduces additional warnings in several drivers.
These will be dealt with in separate patches.

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0157141a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
#include <linux/init.h>

struct sparc64_tick_ops {
	unsigned long (*get_tick)(void);
	unsigned long long (*get_tick)(void);
	int (*add_compare)(unsigned long);
	unsigned long softint_mask;
	void (*disable_irq)(void);
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#if defined(__sparc__) && defined(__arch64__)

/*** SPARC 64 bit ***/
#include <asm-generic/int-l64.h>
#include <asm-generic/int-ll64.h>

#ifndef __ASSEMBLY__

+17 −17
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ static void md_update_data(struct ds_info *dp,

	rp = (struct ds_md_update_req *) (dpkt + 1);

	printk(KERN_INFO "ds-%lu: Machine description update.\n", dp->id);
	printk(KERN_INFO "ds-%llu: Machine description update.\n", dp->id);

	mdesc_update();

@@ -325,7 +325,7 @@ static void domain_shutdown_data(struct ds_info *dp,

	rp = (struct ds_shutdown_req *) (dpkt + 1);

	printk(KERN_ALERT "ds-%lu: Shutdown request from "
	printk(KERN_ALERT "ds-%llu: Shutdown request from "
	       "LDOM manager received.\n", dp->id);

	memset(&pkt, 0, sizeof(pkt));
@@ -365,7 +365,7 @@ static void domain_panic_data(struct ds_info *dp,

	rp = (struct ds_panic_req *) (dpkt + 1);

	printk(KERN_ALERT "ds-%lu: Panic request from "
	printk(KERN_ALERT "ds-%llu: Panic request from "
	       "LDOM manager received.\n", dp->id);

	memset(&pkt, 0, sizeof(pkt));
@@ -549,7 +549,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp,
	for_each_cpu_mask(cpu, *mask) {
		int err;

		printk(KERN_INFO "ds-%lu: Starting cpu %d...\n",
		printk(KERN_INFO "ds-%llu: Starting cpu %d...\n",
		       dp->id, cpu);
		err = cpu_up(cpu);
		if (err) {
@@ -565,7 +565,7 @@ static int __cpuinit dr_cpu_configure(struct ds_info *dp,
				res = DR_CPU_RES_CPU_NOT_RESPONDING;
			}

			printk(KERN_INFO "ds-%lu: CPU startup failed err=%d\n",
			printk(KERN_INFO "ds-%llu: CPU startup failed err=%d\n",
			       dp->id, err);
			dr_cpu_mark(resp, cpu, ncpus, res, stat);
		}
@@ -605,7 +605,7 @@ static int dr_cpu_unconfigure(struct ds_info *dp,
	for_each_cpu_mask(cpu, *mask) {
		int err;

		printk(KERN_INFO "ds-%lu: Shutting down cpu %d...\n",
		printk(KERN_INFO "ds-%llu: Shutting down cpu %d...\n",
		       dp->id, cpu);
		err = cpu_down(cpu);
		if (err)
@@ -684,7 +684,7 @@ static void ds_pri_data(struct ds_info *dp,

	rp = (struct ds_pri_msg *) (dpkt + 1);

	printk(KERN_INFO "ds-%lu: PRI REQ [%lx:%lx], len=%d\n",
	printk(KERN_INFO "ds-%llu: PRI REQ [%llx:%llx], len=%d\n",
	       dp->id, rp->req_num, rp->type, len);
}

@@ -816,7 +816,7 @@ void ldom_set_var(const char *var, const char *value)

		if (ds_var_doorbell == 0 ||
		    ds_var_response != DS_VAR_SUCCESS)
			printk(KERN_ERR "ds-%lu: var-config [%s:%s] "
			printk(KERN_ERR "ds-%llu: var-config [%s:%s] "
			       "failed, response(%d).\n",
			       dp->id, var, value,
			       ds_var_response);
@@ -850,7 +850,7 @@ void ldom_power_off(void)

static void ds_conn_reset(struct ds_info *dp)
{
	printk(KERN_ERR "ds-%lu: ds_conn_reset() from %p\n",
	printk(KERN_ERR "ds-%llu: ds_conn_reset() from %p\n",
	       dp->id, __builtin_return_address(0));
}

@@ -912,11 +912,11 @@ static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt)
		struct ds_cap_state *cp = find_cap(dp, ap->handle);

		if (!cp) {
			printk(KERN_ERR "ds-%lu: REG ACK for unknown "
			       "handle %lx\n", dp->id, ap->handle);
			printk(KERN_ERR "ds-%llu: REG ACK for unknown "
			       "handle %llx\n", dp->id, ap->handle);
			return 0;
		}
		printk(KERN_INFO "ds-%lu: Registered %s service.\n",
		printk(KERN_INFO "ds-%llu: Registered %s service.\n",
		       dp->id, cp->service_id);
		cp->state = CAP_STATE_REGISTERED;
	} else if (pkt->type == DS_REG_NACK) {
@@ -924,8 +924,8 @@ static int ds_handshake(struct ds_info *dp, struct ds_msg_tag *pkt)
		struct ds_cap_state *cp = find_cap(dp, np->handle);

		if (!cp) {
			printk(KERN_ERR "ds-%lu: REG NACK for "
			       "unknown handle %lx\n",
			printk(KERN_ERR "ds-%llu: REG NACK for "
			       "unknown handle %llx\n",
			       dp->id, np->handle);
			return 0;
		}
@@ -982,8 +982,8 @@ static void process_ds_work(void)
		int req_len = qp->req_len;

		if (!cp) {
			printk(KERN_ERR "ds-%lu: Data for unknown "
			       "handle %lu\n",
			printk(KERN_ERR "ds-%llu: Data for unknown "
			       "handle %llu\n",
			       dp->id, dpkt->handle);

			spin_lock_irqsave(&ds_lock, flags);
@@ -1085,7 +1085,7 @@ static void ds_event(void *arg, int event)
	}

	if (event != LDC_EVENT_DATA_READY) {
		printk(KERN_WARNING "ds-%lu: Unexpected LDC event %d\n",
		printk(KERN_WARNING "ds-%llu: Unexpected LDC event %d\n",
		       dp->id, event);
		spin_unlock_irqrestore(&ds_lock, flags);
		return;
+1 −1
Original line number Diff line number Diff line
@@ -434,7 +434,7 @@ static void strbuf_flush(struct strbuf *strbuf, struct iommu *iommu,
		val = iommu_read(matchreg);
		if (unlikely(val)) {
			printk(KERN_WARNING "strbuf_flush: ctx flush "
			       "timeout matchreg[%lx] ctx[%lx]\n",
			       "timeout matchreg[%llx] ctx[%lx]\n",
			       val, ctx);
			goto do_page_flush;
		}
+7 −7
Original line number Diff line number Diff line
@@ -536,24 +536,24 @@ static void __init report_platform_properties(void)

	v = mdesc_get_property(hp, pn, "hostid", NULL);
	if (v)
		printk("PLATFORM: hostid [%08lx]\n", *v);
		printk("PLATFORM: hostid [%08llx]\n", *v);
	v = mdesc_get_property(hp, pn, "serial#", NULL);
	if (v)
		printk("PLATFORM: serial# [%08lx]\n", *v);
		printk("PLATFORM: serial# [%08llx]\n", *v);
	v = mdesc_get_property(hp, pn, "stick-frequency", NULL);
	printk("PLATFORM: stick-frequency [%08lx]\n", *v);
	printk("PLATFORM: stick-frequency [%08llx]\n", *v);
	v = mdesc_get_property(hp, pn, "mac-address", NULL);
	if (v)
		printk("PLATFORM: mac-address [%lx]\n", *v);
		printk("PLATFORM: mac-address [%llx]\n", *v);
	v = mdesc_get_property(hp, pn, "watchdog-resolution", NULL);
	if (v)
		printk("PLATFORM: watchdog-resolution [%lu ms]\n", *v);
		printk("PLATFORM: watchdog-resolution [%llu ms]\n", *v);
	v = mdesc_get_property(hp, pn, "watchdog-max-timeout", NULL);
	if (v)
		printk("PLATFORM: watchdog-max-timeout [%lu ms]\n", *v);
		printk("PLATFORM: watchdog-max-timeout [%llu ms]\n", *v);
	v = mdesc_get_property(hp, pn, "max-cpus", NULL);
	if (v)
		printk("PLATFORM: max-cpus [%lu]\n", *v);
		printk("PLATFORM: max-cpus [%llu]\n", *v);

#ifdef CONFIG_SMP
	{
Loading