summaryrefslogtreecommitdiffstats
path: root/lib/atomic64_test.c
diff options
context:
space:
mode:
authorSundar R Iyer <sundar.iyer@stericsson.com>2010-05-17 21:24:48 +0530
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-05-25 10:16:02 +0100
commit500b4ac90d1103a7c302d5bb16c53f4ffc45d057 (patch)
treeb6e134661375564fc654b424fbdaa240c0a2a230 /lib/atomic64_test.c
parent64714354a45a58a072cfc926db0a078611a63d43 (diff)
downloadkernel-crypto-500b4ac90d1103a7c302d5bb16c53f4ffc45d057.tar.gz
kernel-crypto-500b4ac90d1103a7c302d5bb16c53f4ffc45d057.tar.xz
kernel-crypto-500b4ac90d1103a7c302d5bb16c53f4ffc45d057.zip
regulator: return set_mode is same mode is requested
On Mon, 2010-05-17 at 17:34 +0200, Mark Brown wrote: > This doesn't seem like the right error handling - if the driver has a > set_mode() you'd *expect* it to have a get_mode() but there's no need > for it to be a strict requirement. True. In such a case, even a valid request would be lost! So now in the updated patch: - check if get_mode is present to avoid oops; - if get_mode is not present, proceed anyways for the request. Here is the updated patch: >From bad0d5eb51ef84be5b100e3dd0f5a590ea0529b6 Mon Sep 17 00:00:00 2001 From: Sundar R Iyer <sundar.iyer@stericsson.com> Date: Fri, 14 May 2010 15:14:17 +0530 Subject: [PATCH 1/1] regulator: return set_mode when same mode is requested save I/O costs by returning when the same mode is requested for the regulator Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Sundar R Iyer <sundar.iyer@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'lib/atomic64_test.c')
0 files changed, 0 insertions, 0 deletions
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
# IPA build system cannot cope with parallel build; disable parallel build
.NOTPARALLEL:

include VERSION

SUBDIRS=asn1 daemons install ipapython ipalib
CLIENTDIRS=ipapython ipalib client asn1
CLIENTPYDIRS=ipaclient ipaplatform

PRJ_PREFIX=freeipa

RPMBUILD ?= $(PWD)/rpmbuild
TARGET ?= master

SUPPORTED_PLATFORM ?= fedora

IPA_NUM_VERSION ?= $(shell printf %d%02d%02d $(IPA_VERSION_MAJOR) $(IPA_VERSION_MINOR) $(IPA_VERSION_RELEASE))

# After updating the version in VERSION you should run the version-update
# target.

ifeq ($(IPA_VERSION_IS_GIT_SNAPSHOT),"yes")
DATESTR:=$(shell date -u +'%Y%m%d%H%M')
GIT_VERSION:=$(shell git show --pretty=format:"%h" --stat HEAD 2>/dev/null|head -1)
ifneq ($(GIT_VERSION),)
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).$(DATESTR)GIT$(GIT_VERSION)
endif # in a git tree and git returned a version
endif # git

ifndef IPA_VERSION
ifdef IPA_VERSION_ALPHA_RELEASE
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).alpha$(IPA_VERSION_ALPHA_RELEASE)
else
ifdef IPA_VERSION_BETA_RELEASE
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).beta$(IPA_VERSION_BETA_RELEASE)
else
ifdef IPA_VERSION_RC_RELEASE
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).rc$(IPA_VERSION_RC_RELEASE)
else
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE)
endif # rc
endif # beta
endif # alpha
endif # ipa_version

IPA_VENDOR_VERSION=$(IPA_VERSION)$(IPA_VENDOR_VERSION_SUFFIX)

TARBALL_PREFIX=freeipa-$(IPA_VERSION)
TARBALL=$(TARBALL_PREFIX).tar.gz

IPA_RPM_RELEASE=$(shell cat RELEASE)

LIBDIR ?= /usr/lib

DEVELOPER_MODE ?= 0
ifneq ($(DEVELOPER_MODE),0)
LINT_IGNORE_FAIL=true
else
LINT_IGNORE_FAIL=false
endif

PYTHON ?= $(shell rpm -E %__python || echo /usr/bin/python2)

CFLAGS := -g -O2 -Wall -Wextra -Wformat-security -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers $(CFLAGS)
export CFLAGS

# Uncomment to increase Java stack size for Web UI build in case it fails
# because of stack overflow exception. Default should be OK for most platforms.
#JAVA_STACK_SIZE ?= 8m
#export JAVA_STACK_SIZE

all: bootstrap-autogen server tests
	@for subdir in $(SUBDIRS); do \
		(cd $$subdir && $(MAKE) $@) || exit 1; \
	done

client: client-autogen
	@for subdir in $(CLIENTDIRS); do \
		(cd $$subdir && $(MAKE) all) || exit 1; \
	done
	@for subdir in $(CLIENTPYDIRS); do \
		(cd $$subdir && $(PYTHON) setup.py build); \
	done

check: bootstrap-autogen server tests
	@for subdir in $(SUBDIRS); do \
		(cd $$subdir && $(MAKE) check) || exit 1; \
	done

client-check: client-autogen
	@for subdir in $(CLIENTDIRS); do \
		(cd $$subdir && $(MAKE) check) || exit 1; \
	done

bootstrap-autogen: version-update client-autogen
	@echo "Building IPA $(IPA_VERSION)"
	cd asn1; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
	cd daemons; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR) --with-openldap; fi
	cd install; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi

client-autogen: version-update
	cd asn1; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
	cd client; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
	cd install; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi

tests-man-autogen: version-update
	cd ipatests/man; if [ ! -e Makefile ]; then ../../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi

install: all server-install tests-install client-install
	@for subdir in $(SUBDIRS); do \
		(cd $$subdir && $(MAKE) $@) || exit 1; \
	done

client-install: client client-dirs
	@for subdir in $(CLIENTDIRS); do \
		(cd $$subdir && $(MAKE) install) || exit 1; \
	done
	cd install/po && $(MAKE) install || exit 1;
	@for subdir in $(CLIENTPYDIRS); do \
		if [ "$(DESTDIR)" = "" ]; then \
			(cd $$subdir && $(PYTHON) setup.py install); \
		else \
			(cd $$subdir && $(PYTHON) setup.py install --root $(DESTDIR)); \
		fi \
	done

client-dirs:
	@if [ "$(DESTDIR)" != "" ] ; then \
		mkdir -p $(DESTDIR)/etc/ipa ; \
		mkdir -p $(DESTDIR)/var/lib/ipa-client/sysrestore ; \
	else \
		echo "DESTDIR was not set, please create /etc/ipa and /var/lib/ipa-client/sysrestore" ; \
		echo "Without those directories ipa-client-install will fail" ; \
	fi

lint: bootstrap-autogen
	# find all python modules and executable python files outside modules for pylint check
	FILES=`find . \
		-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
		-path '*/.*' -o \
		-path './dist/*' -o \
		-path './lextab.py' -o \
		-path './yacctab.py' -o \
		-name '*~' -o \
		-name \*.py -print -o \
		-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
	echo "Pylint is running, please wait ..."; \
	PYTHONPATH=. pylint --rcfile=pylintrc $(PYLINTFLAGS) $$FILES || $(LINT_IGNORE_FAIL)
	$(MAKE) -C install/po validate-src-strings || $(LINT_IGNORE_FAIL)


test:
	./make-test

release-update:
	if [ ! -e RELEASE ]; then echo 0 > RELEASE; fi

version-update: release-update
	sed -e s/__VERSION__/$(IPA_VERSION)/ -e s/__RELEASE__/$(IPA_RPM_RELEASE)/ \
		freeipa.spec.in > freeipa.spec
	sed -e s/__VERSION__/$(IPA_VERSION)/ version.m4.in \
		> version.m4
	sed -e s/__VERSION__/$(IPA_VERSION)/ ipapython/setup.py.in \
		> ipapython/setup.py
	sed -e s/__VERSION__/$(IPA_VERSION)/ ipaplatform/setup.py.in \
		> ipaplatform/setup.py
	sed -e s/__VERSION__/$(IPA_VERSION)/ ipalib/setup.py.in \
		> ipalib/setup.py
	sed -e s/__VERSION__/$(IPA_VERSION)/ ipapython/version.py.in \
		> ipapython/version.py
	sed -e s/__VERSION__/$(IPA_VERSION)/ ipatests/setup.py.in \
		> ipatests/setup.py
	sed -e s/__VERSION__/$(IPA_VERSION)/ ipaclient/setup.py.in \
		> ipaclient/setup.py
	sed -e s/__NUM_VERSION__/$(IPA_NUM_VERSION)/ install/ui/src/libs/loader.js.in \
		> install/ui/src/libs/loader.js
	sed -i -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" install/ui/src/libs/loader.js
	sed -i -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" ipapython/version.py
	sed -i -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):" ipapython/version.py
	sed -i -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" ipapython/version.py
	grep -Po '(?<=default: ).*' API.txt | sed -n -i -e "/__DEFAULT_PLUGINS__/!{p;b};r /dev/stdin" ipapython/version.py
	touch -r ipapython/version.py.in ipapython/version.py
	sed -e s/__VERSION__/$(IPA_VERSION)/ daemons/ipa-version.h.in \
		> daemons/ipa-version.h
	sed -i -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" daemons/ipa-version.h
	sed -i -e "s:__DATA_VERSION__:$(IPA_DATA_VERSION):" daemons/ipa-version.h

	sed -e s/__VERSION__/$(IPA_VERSION)/ client/version.m4.in \
		> client/version.m4

	if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
		sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
			ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
		rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
		ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
		ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
		ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
		ln -s $(SUPPORTED_PLATFORM)/constants.py ipaplatform/constants.py; \
	fi

	if [ "$(SKIP_API_VERSION_CHECK)" != "yes" ]; then \
		./makeapi --validate && \
		./makeaci --validate; \
	fi

server: version-update
	$(PYTHON) setup.py build
	cd ipaplatform && $(PYTHON) setup.py build

server-install: server
	if [ "$(DESTDIR)" = "" ]; then \
		$(PYTHON) setup.py install; \
		(cd ipaplatform && $(PYTHON) setup.py install); \
	else \
		$(PYTHON) setup.py install --root $(DESTDIR); \
		(cd ipaplatform && $(PYTHON) setup.py install --root $(DESTDIR)); \
	fi

tests: version-update tests-man-autogen
	cd ipatests; $(PYTHON) setup.py build
	cd ipatests/man && $(MAKE) all

tests-install: tests
	if [ "$(DESTDIR)" = "" ]; then \
		cd ipatests; $(PYTHON) setup.py install; \
	else \
		cd ipatests; $(PYTHON) setup.py install --root $(DESTDIR); \
	fi
	cd ipatests/man && $(MAKE) install

archive:
	-mkdir -p dist
	git archive --format=tar --prefix=ipa/ $(TARGET) | (cd dist && tar xf -)

local-archive:
	-mkdir -p dist/$(TARBALL_PREFIX)
	rsync -a --exclude=dist --exclude=.git --exclude=/build --exclude=rpmbuild . dist/$(TARBALL_PREFIX)

archive-cleanup:
	rm -fr dist/freeipa

tarballs: local-archive
	-mkdir -p dist/sources
	# tar up clean sources
	cd dist/$(TARBALL_PREFIX)/client; ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); make distclean
	cd dist/$(TARBALL_PREFIX)/daemons; ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); make distclean
	cd dist/$(TARBALL_PREFIX)/install; ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); make distclean
	cd dist; tar cfz sources/$(TARBALL) $(TARBALL_PREFIX)
	rm -rf dist/$(TARBALL_PREFIX)

rpmroot:
	rm -rf $(RPMBUILD)
	mkdir -p $(RPMBUILD)/BUILD
	mkdir -p $(RPMBUILD)/RPMS
	mkdir -p $(RPMBUILD)/SOURCES
	mkdir -p $(RPMBUILD)/SPECS
	mkdir -p $(RPMBUILD)/SRPMS

rpmdistdir:
	mkdir -p dist/rpms
	mkdir -p dist/srpms

rpms: rpmroot rpmdistdir version-update tarballs
	cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
	rpmbuild --define "_topdir $(RPMBUILD)" -ba freeipa.spec